@zitadel/sdk-react 0.1.0-alpha.13 → 0.1.0-alpha.15

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { configureZitadel, getApi, getZitadelConfig, ZitadelConfig, ZitadelProject } from '@zitadel/api/config';
2
- import { ZitadelLogin as ZitadelLoginElement, ZitadelLogout as ZitadelLogoutElement } from '@zitadel/components';
2
+ import { ZitadelLogin as ZitadelLoginElement, ZitadelLogout as ZitadelLogoutElement, ZitadelSession as ZitadelSessionElement } from '@zitadel/components';
3
3
  import * as React from "react";
4
4
  export { configureZitadel, getApi, getZitadelConfig };
5
5
  export type { ZitadelConfig, ZitadelProject };
@@ -24,4 +24,13 @@ export declare const ZitadelLogin: React.ForwardRefExoticComponent<import('@zita
24
24
  * so consumers can imperatively access the upgraded web component.
25
25
  */
26
26
  export declare const ZitadelLogout: React.ForwardRefExoticComponent<import('@zitadel/sdk-core/types').ZitadelLogoutConfig & import('@zitadel/sdk-core/types').ZitadelLogoutHandlers & React.RefAttributes<ZitadelLogoutElement>>;
27
+ /**
28
+ * React component wrapping the `<zitadel-session>` web component — the
29
+ * post-sign-in "signed in as" card. Binds the `ZitadelProject` handle as a DOM
30
+ * property (or the discrete project id / proxy path as attributes) and forwards
31
+ * the widget's `zitadel-signout` event as an optional callback.
32
+ *
33
+ * A forwarded `ref` resolves to the underlying `<zitadel-session>` DOM element.
34
+ */
35
+ export declare const ZitadelSession: React.ForwardRefExoticComponent<import('@zitadel/sdk-core/types').ZitadelSessionConfig & import('@zitadel/sdk-core/types').ZitadelSessionHandlers & React.RefAttributes<ZitadelSessionElement>>;
27
36
  //# sourceMappingURL=index.d.ts.map
@@ -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,EACtC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAC9C,cAAc,SAAS,CAAC;AAiDxB;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,2LAiBxB,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,8LAUzB,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;AA0DxB;;;;;;;;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,59 +1,80 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { createComponent as r } from "@lit/react";
3
- import { configureZitadel as N, getApi as x, getZitadelConfig as E } from "@zitadel/api/config";
4
- import { ZitadelLogin as s, ZitadelLogout as p } from "@zitadel/components";
2
+ import { createComponent as d } from "@lit/react";
3
+ import { configureZitadel as v, getApi as x, getZitadelConfig as y } from "@zitadel/api/config";
4
+ import { ZitadelLogin as m, ZitadelLogout as u, ZitadelSession as f } from "@zitadel/components";
5
5
  import * as l from "react";
6
- const f = r({
6
+ const c = d({
7
7
  react: l,
8
8
  tagName: "zitadel-login",
9
- elementClass: s,
9
+ elementClass: m,
10
10
  events: {
11
11
  onZitadelFlowStep: "zitadel-flow-step",
12
12
  onZitadelFlowInput: "zitadel-flow-input",
13
13
  onZitadelFlowComplete: "zitadel-flow-complete",
14
14
  onZitadelFlowError: "zitadel-flow-error"
15
15
  }
16
- }), u = r({
16
+ }), p = d({
17
17
  react: l,
18
18
  tagName: "zitadel-logout",
19
- elementClass: p,
19
+ elementClass: u,
20
20
  events: {
21
21
  onZitadelSignout: "zitadel-signout"
22
22
  }
23
- }), c = l.forwardRef(
24
- function({ purpose: e, onFlowStep: o, onFlowInput: i, onFlowComplete: a, onFlowError: d, ...g }, m) {
23
+ }), L = d({
24
+ react: l,
25
+ tagName: "zitadel-session",
26
+ elementClass: f,
27
+ events: {
28
+ onZitadelSignout: "zitadel-signout"
29
+ }
30
+ }), w = l.forwardRef(
31
+ function({ purpose: e, onFlowStep: i, onFlowInput: o, onFlowComplete: a, onFlowError: r, ...Z }, g) {
25
32
  return /* @__PURE__ */ n(
26
- f,
33
+ c,
27
34
  {
28
- ...g,
29
- ref: m,
35
+ ...Z,
36
+ ref: g,
30
37
  purpose: e ?? "login",
31
- onZitadelFlowStep: o && ((t) => o(t.detail)),
32
- onZitadelFlowInput: i && ((t) => i(t.detail)),
38
+ onZitadelFlowStep: i && ((t) => i(t.detail)),
39
+ onZitadelFlowInput: o && ((t) => o(t.detail)),
33
40
  onZitadelFlowComplete: a && ((t) => a(t.detail)),
34
- onZitadelFlowError: d && ((t) => d(t.detail))
41
+ onZitadelFlowError: r && ((t) => r(t.detail))
42
+ }
43
+ );
44
+ }
45
+ );
46
+ w.displayName = "ZitadelLogin";
47
+ const z = l.forwardRef(
48
+ function({ onSignout: e, ...i }, o) {
49
+ return /* @__PURE__ */ n(
50
+ p,
51
+ {
52
+ ...i,
53
+ ref: o,
54
+ onZitadelSignout: e && ((a) => e(a.detail))
35
55
  }
36
56
  );
37
57
  }
38
58
  );
39
- c.displayName = "ZitadelLogin";
40
- const L = l.forwardRef(
41
- function({ onSignout: e, ...o }, i) {
59
+ z.displayName = "ZitadelLogout";
60
+ const S = l.forwardRef(
61
+ function({ onSignout: e, ...i }, o) {
42
62
  return /* @__PURE__ */ n(
43
- u,
63
+ L,
44
64
  {
45
- ...o,
46
- ref: i,
65
+ ...i,
66
+ ref: o,
47
67
  onZitadelSignout: e && ((a) => e(a.detail))
48
68
  }
49
69
  );
50
70
  }
51
71
  );
52
- L.displayName = "ZitadelLogout";
72
+ S.displayName = "ZitadelSession";
53
73
  export {
54
- c as ZitadelLogin,
55
- L as ZitadelLogout,
56
- N as configureZitadel,
74
+ w as ZitadelLogin,
75
+ z as ZitadelLogout,
76
+ S as ZitadelSession,
77
+ v as configureZitadel,
57
78
  x as getApi,
58
- E as getZitadelConfig
79
+ y as getZitadelConfig
59
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zitadel/sdk-react",
3
- "version": "0.1.0-alpha.13",
3
+ "version": "0.1.0-alpha.15",
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/sdk-core": "0.1.0-alpha.13",
31
- "@zitadel/api": "0.1.0-alpha.13",
32
- "@zitadel/components": "0.1.0-alpha.13"
30
+ "@zitadel/api": "0.1.0-alpha.15",
31
+ "@zitadel/sdk-core": "0.1.0-alpha.15",
32
+ "@zitadel/components": "0.1.0-alpha.15"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=18",