@zitadel/sdk-qwik 0.1.0-alpha.17 → 0.1.0-alpha.19
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 +13 -24
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.qwik.mjs +12 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@ export default component$(() => {
|
|
|
24
24
|
|
|
25
25
|
`<ZitadelLogout project={project} postSignOutUrl="/login" />` works the same way.
|
|
26
26
|
|
|
27
|
+
The signed-in session card is `<ZitadelSession project={project} />` (exported as `ZitadelSession`).
|
|
28
|
+
|
|
27
29
|
The widget's flow events are surfaced as optional QRL callbacks:
|
|
28
30
|
`onFlowStep$`, `onFlowInput$`, `onFlowComplete$`, and `onFlowError$`.
|
|
29
31
|
|
|
@@ -32,27 +34,14 @@ The widget's flow events are surfaced as optional QRL callbacks:
|
|
|
32
34
|
|
|
33
35
|
## Proxying to the backend (deployment)
|
|
34
36
|
|
|
35
|
-
The widgets call `${proxyPath}/…` same-origin (default `/__nextgen`).
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
// vercel.json
|
|
50
|
-
{
|
|
51
|
-
"rewrites": [
|
|
52
|
-
{ "source": "/__nextgen/(.*)", "destination": "/api/__nextgen/$1" }
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
For local development you can skip the proxy and point `proxyPath` straight at the
|
|
58
|
-
backend (cross-origin), e.g. `proxyPath: "http://localhost:4000"`.
|
|
37
|
+
The widgets call `${proxyPath}/…` same-origin (default `/__nextgen`). In
|
|
38
|
+
production the same-origin path must come from your hosting platform — until
|
|
39
|
+
the CLI can scaffold those configs, **production SPA deployment is not yet
|
|
40
|
+
supported**; see
|
|
41
|
+
[ADR 036](https://github.com/zitadel/nextgen/blob/main/docs/adrs/036-api-credential-planes.md)
|
|
42
|
+
and [zitadel/nextgen#560](https://github.com/zitadel/nextgen/issues/560). The
|
|
43
|
+
CLI dev proxy covers local development.
|
|
44
|
+
|
|
45
|
+
For local development you can also skip the proxy and point `proxyPath`
|
|
46
|
+
straight at the backend (cross-origin), e.g. `proxyPath: "http://localhost:8080"`
|
|
47
|
+
(the `zitadel start` local runtime default port).
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { configureZitadel, getApi, getZitadelConfig, ZitadelConfig, ZitadelProje
|
|
|
5
5
|
export { configureZitadel, getApi, getZitadelConfig };
|
|
6
6
|
export type { ZitadelConfig, ZitadelProject };
|
|
7
7
|
export * from './types';
|
|
8
|
+
export { businessLocales } from '@zitadel/components';
|
|
8
9
|
/**
|
|
9
10
|
* Wraps each plain-callback handler from the shared SPA contract in a Qwik
|
|
10
11
|
* {@link QRL} and suffixes the prop name with `$`, so the Qwik prop set is
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,mBAAmB,EACnC,aAAa,IAAI,oBAAoB,EACrC,cAAc,IAAI,qBAAqB,EACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAA0C,KAAK,GAAG,EAAE,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,KAAK,aAAa,EAClB,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,KAAK;CACV,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAChD,MAAM,CAAC,oBAAoB,CAAC,GAAG;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAC;CACxD,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,yDA4CvB,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAClD,MAAM,CAAC,qBAAqB,CAAC,GAAG;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC;CACzD,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,aAAa,0DA8BxB,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GACpD,MAAM,CAAC,sBAAsB,CAAC,GAAG;IAC/B;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAC;CAC1D,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,cAAc,2DAkCzB,CAAC"}
|
package/dist/index.qwik.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
-
import "@zitadel/components";
|
|
2
|
+
import { businessLocales } from "@zitadel/components";
|
|
3
3
|
import { component$, useSignal, useVisibleTask$ } from "@builder.io/qwik";
|
|
4
4
|
import { configureZitadel, getApi, getZitadelConfig } from "@zitadel/api/config";
|
|
5
5
|
function projectProp(project, projectId, proxyPath) {
|
|
@@ -53,7 +53,10 @@ const ZitadelLogin = component$((props) => {
|
|
|
53
53
|
...localeProps(props.locales, props.lang),
|
|
54
54
|
purpose: props.purpose ?? "login",
|
|
55
55
|
"flow-name": props.flowName,
|
|
56
|
-
"post-sign-in-url": props.postSignInUrl
|
|
56
|
+
"post-sign-in-url": props.postSignInUrl,
|
|
57
|
+
variant: props.variant,
|
|
58
|
+
theme: props.theme,
|
|
59
|
+
suppressHeader: props.suppressHeader
|
|
57
60
|
});
|
|
58
61
|
});
|
|
59
62
|
const ZitadelLogout = component$((props) => {
|
|
@@ -79,7 +82,8 @@ const ZitadelLogout = component$((props) => {
|
|
|
79
82
|
}
|
|
80
83
|
},
|
|
81
84
|
...projectProp(props.project, props.projectId, props.proxyPath),
|
|
82
|
-
"post-sign-out-url": props.postSignOutUrl
|
|
85
|
+
"post-sign-out-url": props.postSignOutUrl,
|
|
86
|
+
theme: props.theme
|
|
83
87
|
});
|
|
84
88
|
});
|
|
85
89
|
const ZitadelSession = component$((props) => {
|
|
@@ -107,13 +111,17 @@ const ZitadelSession = component$((props) => {
|
|
|
107
111
|
...projectProp(props.project, props.projectId, props.proxyPath),
|
|
108
112
|
"post-sign-out-url": props.postSignOutUrl,
|
|
109
113
|
heading: props.heading,
|
|
110
|
-
"logout-label": props.logoutLabel
|
|
114
|
+
"logout-label": props.logoutLabel,
|
|
115
|
+
variant: props.variant,
|
|
116
|
+
theme: props.theme,
|
|
117
|
+
suppressHeader: props.suppressHeader
|
|
111
118
|
});
|
|
112
119
|
});
|
|
113
120
|
export {
|
|
114
121
|
ZitadelLogin,
|
|
115
122
|
ZitadelLogout,
|
|
116
123
|
ZitadelSession,
|
|
124
|
+
businessLocales,
|
|
117
125
|
configureZitadel,
|
|
118
126
|
getApi,
|
|
119
127
|
getZitadelConfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zitadel/sdk-qwik",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.19",
|
|
4
4
|
"description": "Qwik components for the Zitadel auth UI (client-side SPA).",
|
|
5
5
|
"homepage": "https://github.com/zitadel/nextgen/tree/main/packages/sdk-qwik#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zitadel/
|
|
33
|
-
"@zitadel/
|
|
34
|
-
"@zitadel/
|
|
32
|
+
"@zitadel/api": "0.1.0-alpha.19",
|
|
33
|
+
"@zitadel/components": "0.1.0-alpha.19",
|
|
34
|
+
"@zitadel/sdk-core": "0.1.0-alpha.19"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@builder.io/qwik": "^1.5.0"
|