@zitadel/components 0.0.0 → 0.1.0-alpha.10

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.
Files changed (119) hide show
  1. package/README.md +76 -55
  2. package/dist/atoms/index.d.mts +1 -1
  3. package/dist/atoms/index.mjs +1 -1
  4. package/dist/{atoms-CmOTltTH.mjs → atoms-BaayzEsr.mjs} +246 -93
  5. package/dist/atoms-BaayzEsr.mjs.map +1 -0
  6. package/dist/default-Cpl78hQN.mjs +6 -0
  7. package/dist/default-Cpl78hQN.mjs.map +1 -0
  8. package/dist/{index-7FDHEpv5.d.mts → index-DB_JTtln.d.mts} +104 -100
  9. package/dist/index-DB_JTtln.d.mts.map +1 -0
  10. package/dist/{index-DIUFZjXw.d.mts → index-DVDCrfkv.d.mts} +1550 -850
  11. package/dist/index-DVDCrfkv.d.mts.map +1 -0
  12. package/dist/{index-DaOSCm0T.d.mts → index-EJengPPu.d.mts} +1 -1
  13. package/dist/{index-DaOSCm0T.d.mts.map → index-EJengPPu.d.mts.map} +1 -1
  14. package/dist/index.d.mts +6 -5
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +5 -4
  17. package/dist/{manifest-DCC2FxCE.d.mts → manifest-DN5Al_Ur.d.mts} +1 -1
  18. package/dist/{manifest-DCC2FxCE.d.mts.map → manifest-DN5Al_Ur.d.mts.map} +1 -1
  19. package/dist/manifests.d.mts +1 -1
  20. package/dist/manifests.mjs +1 -1
  21. package/dist/orchestrator/index.d.mts +3 -2
  22. package/dist/orchestrator/index.mjs +3 -2
  23. package/dist/{orchestrator-CNKo2WQG.mjs → orchestrator-BEvS2wA_.mjs} +667 -641
  24. package/dist/orchestrator-BEvS2wA_.mjs.map +1 -0
  25. package/dist/standalone.mjs +12156 -0
  26. package/dist/tokens/index.d.mts +1 -1
  27. package/dist/tokens/index.mjs +1 -1
  28. package/dist/{tokens-TXmurodq.mjs → tokens-BQ_augxi.mjs} +2 -2
  29. package/dist/{tokens-TXmurodq.mjs.map → tokens-BQ_augxi.mjs.map} +1 -1
  30. package/package.json +9 -17
  31. package/dist/atoms/index.d.ts +0 -9
  32. package/dist/atoms/index.d.ts.map +0 -1
  33. package/dist/atoms/zl-alert.d.ts +0 -56
  34. package/dist/atoms/zl-alert.d.ts.map +0 -1
  35. package/dist/atoms/zl-button.d.ts +0 -83
  36. package/dist/atoms/zl-button.d.ts.map +0 -1
  37. package/dist/atoms/zl-card.d.ts +0 -46
  38. package/dist/atoms/zl-card.d.ts.map +0 -1
  39. package/dist/atoms/zl-field.d.ts +0 -73
  40. package/dist/atoms/zl-field.d.ts.map +0 -1
  41. package/dist/atoms/zl-icon.d.ts +0 -48
  42. package/dist/atoms/zl-icon.d.ts.map +0 -1
  43. package/dist/atoms/zl-page-shell.d.ts +0 -42
  44. package/dist/atoms/zl-page-shell.d.ts.map +0 -1
  45. package/dist/atoms/zl-passkey.d.ts +0 -118
  46. package/dist/atoms/zl-passkey.d.ts.map +0 -1
  47. package/dist/atoms/zl-pill.d.ts +0 -55
  48. package/dist/atoms/zl-pill.d.ts.map +0 -1
  49. package/dist/atoms-CmOTltTH.mjs.map +0 -1
  50. package/dist/index-7FDHEpv5.d.mts.map +0 -1
  51. package/dist/index-DIUFZjXw.d.mts.map +0 -1
  52. package/dist/index-bZEvwHtq.d.mts +0 -996
  53. package/dist/index-bZEvwHtq.d.mts.map +0 -1
  54. package/dist/index.d.ts +0 -16
  55. package/dist/index.d.ts.map +0 -1
  56. package/dist/internal/base64url.d.ts +0 -18
  57. package/dist/internal/base64url.d.ts.map +0 -1
  58. package/dist/internal/unique-id.d.ts +0 -2
  59. package/dist/internal/unique-id.d.ts.map +0 -1
  60. package/dist/manifest.d.ts +0 -36
  61. package/dist/manifest.d.ts.map +0 -1
  62. package/dist/manifests.d.ts +0 -6
  63. package/dist/manifests.d.ts.map +0 -1
  64. package/dist/orchestrator/api-client.d.ts +0 -33
  65. package/dist/orchestrator/api-client.d.ts.map +0 -1
  66. package/dist/orchestrator/branding-to-tokens.d.ts +0 -28
  67. package/dist/orchestrator/branding-to-tokens.d.ts.map +0 -1
  68. package/dist/orchestrator/branding-validator.d.ts +0 -7
  69. package/dist/orchestrator/branding-validator.d.ts.map +0 -1
  70. package/dist/orchestrator/branding.d.ts +0 -76
  71. package/dist/orchestrator/branding.d.ts.map +0 -1
  72. package/dist/orchestrator/font-loader.d.ts +0 -2
  73. package/dist/orchestrator/font-loader.d.ts.map +0 -1
  74. package/dist/orchestrator/index.d.ts +0 -25
  75. package/dist/orchestrator/index.d.ts.map +0 -1
  76. package/dist/orchestrator/liquid.d.ts +0 -28
  77. package/dist/orchestrator/liquid.d.ts.map +0 -1
  78. package/dist/orchestrator/locales/de.d.ts +0 -9
  79. package/dist/orchestrator/locales/de.d.ts.map +0 -1
  80. package/dist/orchestrator/locales/en.d.ts +0 -13
  81. package/dist/orchestrator/locales/en.d.ts.map +0 -1
  82. package/dist/orchestrator/locales/index.d.ts +0 -12
  83. package/dist/orchestrator/locales/index.d.ts.map +0 -1
  84. package/dist/orchestrator/mandatory-gates.d.ts +0 -26
  85. package/dist/orchestrator/mandatory-gates.d.ts.map +0 -1
  86. package/dist/orchestrator/sanitiser.d.ts +0 -6
  87. package/dist/orchestrator/sanitiser.d.ts.map +0 -1
  88. package/dist/orchestrator/template-context.d.ts +0 -55
  89. package/dist/orchestrator/template-context.d.ts.map +0 -1
  90. package/dist/orchestrator/template-names.d.ts +0 -16
  91. package/dist/orchestrator/template-names.d.ts.map +0 -1
  92. package/dist/orchestrator/templates/auth-form.liquid.d.ts +0 -14
  93. package/dist/orchestrator/templates/auth-form.liquid.d.ts.map +0 -1
  94. package/dist/orchestrator/templates/default.liquid.d.ts +0 -23
  95. package/dist/orchestrator/templates/default.liquid.d.ts.map +0 -1
  96. package/dist/orchestrator/templates/passkey-upsell.liquid.d.ts +0 -15
  97. package/dist/orchestrator/templates/passkey-upsell.liquid.d.ts.map +0 -1
  98. package/dist/orchestrator/templates/signed-in.liquid.d.ts +0 -20
  99. package/dist/orchestrator/templates/signed-in.liquid.d.ts.map +0 -1
  100. package/dist/orchestrator/theme-controller.d.ts +0 -30
  101. package/dist/orchestrator/theme-controller.d.ts.map +0 -1
  102. package/dist/orchestrator/zitadel-login.d.ts +0 -182
  103. package/dist/orchestrator/zitadel-login.d.ts.map +0 -1
  104. package/dist/orchestrator/zitadel-logout.d.ts +0 -86
  105. package/dist/orchestrator/zitadel-logout.d.ts.map +0 -1
  106. package/dist/orchestrator-CNKo2WQG.mjs.map +0 -1
  107. package/dist/styles/base.d.ts +0 -7
  108. package/dist/styles/base.d.ts.map +0 -1
  109. package/dist/styles/focus-ring.d.ts +0 -7
  110. package/dist/styles/focus-ring.d.ts.map +0 -1
  111. package/dist/styles/index.d.ts +0 -5
  112. package/dist/styles/index.d.ts.map +0 -1
  113. package/dist/styles/surface.d.ts +0 -8
  114. package/dist/styles/surface.d.ts.map +0 -1
  115. package/dist/styles/tokens.d.ts +0 -11
  116. package/dist/styles/tokens.d.ts.map +0 -1
  117. package/dist/tokens/index.d.ts +0 -9
  118. package/dist/tokens/index.d.ts.map +0 -1
  119. package/dist/tsconfig.lib.tsbuildinfo +0 -1
@@ -1,23 +0,0 @@
1
- /**
2
- * Bundled `default.liquid` master template.
3
- *
4
- * Renders the four target Figma auth screens (Sign in, Sign up, Passkey
5
- * upsell, Signed in) by including the appropriate partial based on
6
- * `step.name`. Tenant-specific layouts (`branding.layout`) replace the
7
- * outer chrome only — the per-step partials stay shared so atom output
8
- * tracks the design system without each tenant re-implementing it.
9
- *
10
- * Spec: docs/design/branding/templates.md.
11
- */
12
- export declare const defaultTemplate: string;
13
- /**
14
- * Layout chrome injected as an `adoptedStyleSheet` on the orchestrator's
15
- * shadow root. Provides the page background and the attribution-footer
16
- * positioning that lives *outside* any template — the rest of the visual
17
- * surface is owned by the `<zl-page-shell>` / `<zl-card>` atoms the
18
- * templates render. Token references resolve against the
19
- * `@zitadel/design-tokens` CSS variables that are present on
20
- * `:host` via the branding stylesheet.
21
- */
22
- export declare const layoutChromeCss = "\n:host {\n display: block;\n min-height: 100%;\n background: var(--zl-color-surface-default-black, #0f0f11);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n}\n.zl-mount {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n background: inherit;\n color: inherit;\n}\n.zl-mount > zl-page-shell,\n.zl-mount > [data-zl-template-root] {\n flex: 1 1 auto;\n}\n.zl-attribution {\n display: flex;\n justify-content: center;\n align-items: center;\n background: transparent;\n}\n.zl-attribution[hidden] {\n display: none;\n}\n/* Card header typography \u2014 Figma \"Desktop/Headings/Small\" + \"Body Small\n Regular\" pattern shared by sign-in (6593:141740), passkey upsell\n (6594:89142 / 6594:12796), and signed-in (6596:132845). Templates\n slot raw <h1>/<p> elements into <zl-card>, which keeps them in the\n light DOM where the orchestrator's stylesheet can reach them \u2014 the\n atom intentionally doesn't dictate typography. */\n.zl-card-title {\n margin: 0;\n font-family: var(--zl-font-family-heading, var(--zl-font-family-sans, system-ui, sans-serif));\n font-size: 2rem;\n font-weight: 400;\n line-height: 2.5rem;\n letter-spacing: -0.02em;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n text-align: left;\n}\n.zl-card-subtitle {\n margin: 0;\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 400;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n}\n/* Figma 6593:141989 / 6594:12882 \u2014 left-aligned in Field+CTAs (x=0, items-start). */\n.zl-card-nav {\n margin: 0;\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 400;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n text-align: left;\n}\n.zl-card-nav__link {\n display: inline;\n margin: 0;\n padding: 0;\n border: none;\n background: transparent;\n font: inherit;\n line-height: inherit;\n color: var(--zl-color-icon-default-purple, #bba5e4);\n text-decoration: none;\n cursor: pointer;\n}\n.zl-card-nav__link:hover {\n text-decoration: underline;\n}\n.zl-card-nav__link:focus-visible {\n outline: var(--zl-focus-width, 2px) solid var(--zl-focus-color, #f4f4f6);\n outline-offset: var(--zl-focus-offset, 2px);\n}\n/* Figma 6593:141989 \u2014 forgot password row (left-aligned, before CTAs). */\n.zl-card-forgot {\n margin: 0;\n text-align: left;\n}\n.zl-card-forgot__link {\n display: inline;\n margin: 0;\n padding: 0;\n border: none;\n background: transparent;\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 400;\n color: var(--zl-color-icon-default-purple, #bba5e4);\n text-decoration: none;\n cursor: pointer;\n}\n.zl-card-forgot__link:hover {\n text-decoration: underline;\n}\n.zl-card-forgot__link:focus-visible {\n outline: var(--zl-focus-width, 2px) solid var(--zl-focus-color, #f4f4f6);\n outline-offset: var(--zl-focus-offset, 2px);\n}\n";
23
- //# sourceMappingURL=default.liquid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"default.liquid.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/templates/default.liquid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,QAQ3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,2jGA2G3B,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * `passkey-upsell` partial — third Figma target screen (file
3
- * `xkvBjkOJ8ENuHdTGZHXezK`, node `6594:630`).
4
- *
5
- * Differs from `auth-form`:
6
- * - heading + subtitle live in a compact card (gap 24px instead of 32px),
7
- * - primary "Set up passkey" CTA carries a trailing 24px passkey icon
8
- * (Figma slots the icon to the right of the label, not above it),
9
- * - secondary "Skip for now" uses the dark secondary hierarchy, not the
10
- * `text` hierarchy — the Figma button has a solid #252528 background.
11
- *
12
- * Server-side errors land in a `<zl-alert>` the same way as the auth form.
13
- */
14
- export declare const passkeyUpsellTemplate: string;
15
- //# sourceMappingURL=passkey-upsell.liquid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"passkey-upsell.liquid.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/templates/passkey-upsell.liquid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,QA8DjC,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * `signed-in` partial — fourth Figma target screen (file
3
- * `xkvBjkOJ8ENuHdTGZHXezK`, node `6596:132844`).
4
- *
5
- * Figma layout:
6
- * - heading "You're signed in as" (left-aligned, full width)
7
- * - body line with the authenticated email address (Arimo Regular 16/24)
8
- * - "Continue" primary CTA
9
- * - "Logout" secondary CTA
10
- *
11
- * No avatar / identity hero glyph: the Figma frame is intentionally a
12
- * pure modal layover and dropping the avatar keeps the orchestrator
13
- * default in lockstep with the spec.
14
- *
15
- * Rendered when the flow returns a terminal step (`complete: "show"`)
16
- * and no `post-sign-in-url` is configured, so the user can confirm the
17
- * identity before the host SPA takes over.
18
- */
19
- export declare const signedInTemplate: string;
20
- //# sourceMappingURL=signed-in.liquid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signed-in.liquid.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/templates/signed-in.liquid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,QA8E5B,CAAC"}
@@ -1,30 +0,0 @@
1
- /**
2
- * `ThemeController` — Lit ReactiveController that resolves the active
3
- * `light | dark` theme from the current `Branding` payload and keeps it in
4
- * sync with the OS-level `prefers-color-scheme` when the tenant opts into
5
- * `theme.mode = "auto"`.
6
- *
7
- * Per `docs/design/branding/tokens.md` the orchestrator owns theming entirely.
8
- * Subscribing here is what makes "auto" actually reactive instead of a
9
- * one-shot read at first paint.
10
- */
11
- import type { ReactiveController, ReactiveControllerHost } from "lit";
12
- import type { Branding } from "./branding.js";
13
- export type ResolvedTheme = "light" | "dark";
14
- export declare class ThemeController implements ReactiveController {
15
- private readonly host;
16
- private branding;
17
- private mediaQuery;
18
- private _theme;
19
- constructor(host: ReactiveControllerHost);
20
- get theme(): ResolvedTheme;
21
- setBranding(branding: Branding | undefined): void;
22
- hostConnected(): void;
23
- hostDisconnected(): void;
24
- private refresh;
25
- private attach;
26
- private detach;
27
- private onMediaChange;
28
- private update;
29
- }
30
- //# sourceMappingURL=theme-controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-controller.d.ts","sourceRoot":"","sources":["../../src/orchestrator/theme-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAEtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;AAI7C,qBAAa,eAAgB,YAAW,kBAAkB;IACxD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyB;IAE9C,OAAO,CAAC,QAAQ,CAAuB;IAEvC,OAAO,CAAC,UAAU,CAA+B;IAKjD,OAAO,CAAC,MAAM,CAAyB;IAEvC,YAAY,IAAI,EAAE,sBAAsB,EAGvC;IAED,IAAI,KAAK,IAAI,aAAa,CAEzB;IAED,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,CAGhD;IAED,aAAa,IAAI,IAAI,CAEpB;IAED,gBAAgB,IAAI,IAAI,CAEvB;IAED,OAAO,CAAC,OAAO;IAcf,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,MAAM;CAKf"}
@@ -1,182 +0,0 @@
1
- import { type ZitadelProject } from "@zitadel/api/config";
2
- import type { CreateFlowBodyPurpose } from "@zitadel/api/generated/model";
3
- import { LitElement, type PropertyValues } from "lit";
4
- import "../atoms/index.js";
5
- import { type Locale } from "./locales/index.js";
6
- /**
7
- * `<zitadel-login>` — the auth-UI orchestrator.
8
- *
9
- * Drives the typed `@zitadel/api` Flow API directly: `POST /flow`
10
- * starts a flow, `POST /flow/{id}/submit` advances it. Renders each step
11
- * through LiquidJS, sanitises the output via DOMPurify, and mounts the
12
- * result inside a real `<form>` element in its Shadow DOM via Lit's
13
- * `unsafeHTML` directive. Atom CustomEvents (`zl-input` / `zl-submit`)
14
- * and the form's native `submit` event feed back into the
15
- * submit cycle.
16
- *
17
- * Form participation: the orchestrator owns the `<form>` so Enter submits,
18
- * browsers offer "save password" prompts, and password managers / autofill
19
- * see a real form. Each `<zl-field>` is form-associated (see
20
- * `docs/design/branding/form-participation.md`) so its value participates in
21
- * the form even though it lives inside its own shadow root. The shadow root
22
- * also delegates focus, and after each step swap focus moves to the first
23
- * field so screen-reader and keyboard users land in a sensible spot.
24
- *
25
- * Session/state: the server is stateless between requests — a `_zflow`
26
- * HttpOnly cookie carries orchestration state. We always run with
27
- * `credentials: "include"` (set in `api-client.ts`). The flow handle (`id`)
28
- * may rotate on pivots/pops; we re-read it from every response.
29
- *
30
- * Spec sources:
31
- * - `docs/design/flowengine/flow-engine-guide.md`
32
- * - `docs/design/branding/templates.md`
33
- * - `docs/design/branding/tokens.md`
34
- * - `docs/design/branding/schema.md`
35
- * - `docs/design/branding/form-participation.md`
36
- * - `docs/design/flowengine/template-security.md`
37
- */
38
- export declare class ZitadelLogin extends LitElement {
39
- static shadowRootOptions: ShadowRootInit;
40
- static styles: import("lit").CSSResult;
41
- accessor purpose: CreateFlowBodyPurpose;
42
- /**
43
- * SDK project handle returned by `configureZitadel()`. When set, takes
44
- * precedence over the global singleton from `getZitadelConfig()`.
45
- */
46
- accessor project: ZitadelProject | undefined;
47
- /**
48
- * URL to navigate to after a successful embedded sign-in. When set, the
49
- * orchestrator exchanges the terminal `handoff_token` via the generated
50
- * API client (setting the session cookie) and then performs a full
51
- * navigation to this URL so host middleware can observe the cookie.
52
- * For `complete: "redirect"` the orchestrator follows `redirect_uri`
53
- * instead and does not run the exchange.
54
- */
55
- accessor postSignInUrl: string;
56
- /**
57
- * Existing flow handle to resume rather than start a new flow. When set,
58
- * the orchestrator hits `GET /flow/{id}` instead of `POST /flow` on
59
- * mount, so a page reload after a network blip can re-render the same
60
- * step without losing collected state.
61
- */
62
- accessor resumeFlowId: string;
63
- /**
64
- * BCP 47 language tag (e.g. `"de"`, `"en-US"`). The widget resolves this
65
- * to a built-in locale dictionary. Falls back to auto-detection from
66
- * `document.documentElement.lang` or `navigator.language` when empty.
67
- */
68
- accessor lang: string;
69
- /**
70
- * Custom locale dictionaries keyed by language code. When set, these take
71
- * precedence over the built-in dictionaries for matching language codes.
72
- *
73
- * ```ts
74
- * import { en } from "@zitadel/components";
75
- * const locales = {
76
- * en: { ...en, "identifier.title": "Welcome" },
77
- * de: myGermanDict,
78
- * };
79
- * ```
80
- */
81
- accessor locales: Record<string, Locale> | undefined;
82
- private accessor response;
83
- private accessor branding;
84
- private accessor loading;
85
- private accessor startupError;
86
- private accessor formValues;
87
- private readonly themeController;
88
- private engine;
89
- private readonly sanitise;
90
- /**
91
- * Cached compiled tenant template, keyed by source string. Re-rendering on
92
- * every `formValues` change otherwise re-parses the same template.
93
- */
94
- private tenantTemplateCache;
95
- createRenderRoot(): HTMLElement | DocumentFragment;
96
- /**
97
- * Start the flow after the first render rather than in `connectedCallback`.
98
- * Frameworks that wrap web components (e.g. `@lit/react` in the console)
99
- * attach the element first and then assign object properties (`branding`,
100
- * `locale`) via setters. `connectedCallback` runs synchronously on attach
101
- * — before any setters from a wrapper's effects/refs — so reading those
102
- * properties there sees stale defaults. `firstUpdated` runs after Lit's
103
- * first render, by which time setters from the wrapping framework have
104
- * fired.
105
- */
106
- protected firstUpdated(): void;
107
- /**
108
- * Resolves the effective locale dictionary. The built-in dictionary for the
109
- * resolved language is used as the base; entries from the `locales` map (if
110
- * set) are spread on top so partial overrides work without importing and
111
- * spreading the full base dictionary.
112
- */
113
- private resolveLocale;
114
- willUpdate(changed: PropertyValues<this>): void;
115
- updated(changed: PropertyValues<this>): void;
116
- render(): import("lit").TemplateResult<1>;
117
- /**
118
- * Inject the attribution badge into the rendered template's
119
- * `<zl-page-shell>` footer slot. The attribution must live INSIDE the
120
- * page-shell so it sits within the 100vh viewport rhythm (matching the
121
- * Figma sign-in frame where the pill sits 24px below the card, both
122
- * centred on the page). It can't be a sibling of the page-shell because
123
- * the page-shell already occupies the full viewport height.
124
- */
125
- private injectAttribution;
126
- /**
127
- * "Secured with Zitadel" attribution chrome injected into every
128
- * template's page-shell footer slot. Controlled by
129
- * `branding.attribution.show_zitadel` — defaults to `true` for
130
- * community / OSS deployments. Licensed tenants can suppress the badge
131
- * entirely or swap it for a `custom_link` value.
132
- */
133
- private renderAttributionHtml;
134
- private startFlow;
135
- private applyResponse;
136
- private maybeCompleteFlow;
137
- private renderStep;
138
- /**
139
- * Build a `FlowIdentity` from the orchestrator's captured form values so
140
- * the signed-in template can greet the user by email without the API
141
- * having to round-trip identity claims. Email comes from the
142
- * identifier step; display name composes from `given_name` /
143
- * `family_name` when the register step ran.
144
- */
145
- private deriveIdentity;
146
- private applyValuesToFields;
147
- private handleAtomInput;
148
- private handleAtomSubmit;
149
- /** Secondary navigation rows (`data-action` on `.zl-card-nav__link`). */
150
- private handleDelegatedAction;
151
- private handleFormSubmit;
152
- /**
153
- * Handle a successful WebAuthn ceremony. Auto-submit with the proof
154
- * as `challenge_response` so the flow advances without extra user
155
- * interaction — the ceremony IS the factor verification (ADR 013).
156
- */
157
- private handlePasskeyResult;
158
- /**
159
- * Handle a WebAuthn ceremony error. Re-render the current step with
160
- * an error message so the user sees feedback and can retry or skip.
161
- *
162
- * Guard: if the step already carries the same error key, skip the update.
163
- * Mutating `this.response` triggers `unsafeHTML` to replace the DOM tree,
164
- * which reconnects a fresh `<zl-passkey>` that immediately re-starts the
165
- * ceremony — creating an infinite loop. The guard breaks the cycle.
166
- *
167
- * We also strip the `challenge` from the step so the template does not
168
- * render a new `<zl-passkey>` on re-render. Without this, the first
169
- * cancel would trigger a second ceremony (the guard prevents a third).
170
- */
171
- private handlePasskeyError;
172
- private findPrimaryAction;
173
- private moveFocusToFirstField;
174
- private submit;
175
- private handleTransportError;
176
- }
177
- declare global {
178
- interface HTMLElementTagNameMap {
179
- "zitadel-login": ZitadelLogin;
180
- }
181
- }
182
- //# sourceMappingURL=zitadel-login.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zitadel-login.d.ts","sourceRoot":"","sources":["../../src/orchestrator/zitadel-login.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,KAAK,EAGV,qBAAqB,EAGtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAa,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKjE,OAAO,mBAAmB,CAAC;AAa3B,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAQrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBACa,YAAa,SAAQ,UAAU;IAC1C,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAOF,OAAgB,MAAM,0BAMpB;IAE0B,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAW;IAE9E;;;OAGG;IAC6B,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,CAAC;IAE7E;;;;;;;OAOG;IACwD,QAAQ,CAAC,aAAa,SAAM;IAEvF;;;;;OAKG;IACsD,QAAQ,CAAC,YAAY,SAAM;IAEpF;;;;OAIG;IACH,SAA8C,IAAI,SAAM;IAExD;;;;;;;;;;;OAWG;IAC6B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAE5E,OAAO,CAAC,QAAQ,C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;YAUf,MAAM;IA4CpB,OAAO,CAAC,oBAAoB;CAa7B;AAWD,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
@@ -1,86 +0,0 @@
1
- import { LitElement, nothing } from "lit";
2
- import { type ZitadelProject } from "@zitadel/api/config";
3
- /**
4
- * `<zitadel-logout>` — orchestrator-tier element that lets the signed-in user
5
- * sign out without touching the flow API.
6
- *
7
- * Reads the user's display name + email from the `__nextgen_display` cookie
8
- * (set by the auth backend on sign-in), renders an avatar trigger with a
9
- * dropdown that exposes a "Sign out" action, and calls the typed
10
- * `endSession` operation in `@zitadel/api`
11
- * (`GET /auth/end-session`). The server clears the session cookie via
12
- * `Set-Cookie: Max-Age=0`; on success the element fires `zitadel-signout`
13
- * and optionally navigates to `post-sign-out-url`.
14
- *
15
- * ## Template-slot mode
16
- *
17
- * When the consumer projects a `<template>` child the element renders the
18
- * template's clone into its light DOM with `{{name}}`, `{{email}}`, and
19
- * `{{initial}}` substituted. Any element with `data-action="logout"` inside
20
- * the cloned template triggers the sign-out flow. This mirrors the
21
- * placeholder `<nextgen-logout>`'s contract so existing markup keeps working.
22
- *
23
- * Default styles consume the `--zl-*` design tokens so tenant branding
24
- * applies automatically — there is no hardcoded brand colour, radius, or
25
- * shadow.
26
- */
27
- export declare class ZitadelLogout extends LitElement {
28
- static styles: import("lit").CSSResult[];
29
- /**
30
- * SDK project handle returned by `configureZitadel()`. When set, takes
31
- * precedence over the global singleton from `getZitadelConfig()`.
32
- */
33
- accessor project: ZitadelProject | undefined;
34
- /** URL to navigate to after a successful sign-out. */
35
- accessor postSignOutUrl: string;
36
- /**
37
- * OIDC `client_id` to forward as a query parameter on the end-session
38
- * request, mirroring the standard end-session contract. Optional —
39
- * leaving this empty is fine when the backend can resolve the client
40
- * from the session cookie alone.
41
- */
42
- accessor clientId: string;
43
- private accessor displayName;
44
- private accessor displayEmail;
45
- private accessor open;
46
- private accessor loading;
47
- private accessor errorMessage;
48
- private templateMode;
49
- connectedCallback(): void;
50
- disconnectedCallback(): void;
51
- updated(): void;
52
- /**
53
- * Decodes the `__nextgen_display` cookie (base64-encoded JSON, set by the
54
- * auth backend on sign-in) and populates `displayName` / `displayEmail`.
55
- * A missing or malformed cookie is intentionally non-fatal — the dropdown
56
- * still renders, just with empty values.
57
- */
58
- private readDisplayCookie;
59
- private get initial();
60
- /**
61
- * Clones a consumer-supplied `<template>` into the light DOM, fills the
62
- * `{{name}}`, `{{email}}`, and `{{initial}}` tokens via a TreeWalker, and
63
- * wires every element with `data-action="logout"` to trigger sign-out.
64
- * Light-DOM mounting is deliberate so the consumer's existing CSS applies.
65
- */
66
- private renderTemplate;
67
- private readonly handleDocumentClick;
68
- private readonly handleDocumentKeydown;
69
- private toggleOpen;
70
- private doLogout;
71
- /**
72
- * Returns the absolute URL the end-session request will hit. Useful for
73
- * test assertions and for consumers that prefer to navigate the browser
74
- * directly (instead of fetching) so the OIDC session-end redirect is
75
- * driven by the user agent.
76
- */
77
- getEndSessionUrl(): string;
78
- private handleSignOutClick;
79
- render(): typeof nothing | import("lit").TemplateResult<1>;
80
- }
81
- declare global {
82
- interface HTMLElementTagNameMap {
83
- "zitadel-logout": ZitadelLogout;
84
- }
85
- }
86
- //# sourceMappingURL=zitadel-logout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zitadel-logout.d.ts","sourceRoot":"","sources":["../../src/orchestrator/zitadel-logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,OAAO,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAkBpF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBACa,aAAc,SAAQ,UAAU;IAC3C,OAAgB,MAAM,4BA2IpB;IAEF;;;OAGG;IAC6B,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,SAAS,CAAC;IAE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