@zitadel/components 0.1.0-alpha.11 → 0.1.0-alpha.13
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 +25 -42
- package/dist/atoms/index.d.mts +2 -2
- package/dist/atoms/index.mjs +2 -2
- package/dist/{atoms-BHSt5lSe.mjs → atoms-BSwVl736.mjs} +616 -10
- package/dist/atoms-BSwVl736.mjs.map +1 -0
- package/dist/default-W5MwYLBc.mjs +6 -0
- package/dist/default-W5MwYLBc.mjs.map +1 -0
- package/dist/{index-DVDCrfkv.d.mts → index-D4LkdeFl.d.mts} +798 -78
- package/dist/index-D4LkdeFl.d.mts.map +1 -0
- package/dist/{index-Bv62se8F.d.mts → index-ojrCi-_k.d.mts} +30 -8
- package/dist/index-ojrCi-_k.d.mts.map +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/manifests.d.mts.map +1 -1
- package/dist/manifests.mjs +4 -2
- package/dist/manifests.mjs.map +1 -1
- package/dist/orchestrator/index.d.mts +2 -2
- package/dist/orchestrator/index.mjs +2 -2
- package/dist/{orchestrator-BeTmVk54.mjs → orchestrator-SBANwyzM.mjs} +83 -23
- package/dist/orchestrator-SBANwyzM.mjs.map +1 -0
- package/dist/standalone.mjs +707 -30
- package/package.json +2 -5
- package/dist/atoms-BHSt5lSe.mjs.map +0 -1
- package/dist/default-Cpl78hQN.mjs +0 -6
- package/dist/default-Cpl78hQN.mjs.map +0 -1
- package/dist/index-Bv62se8F.d.mts.map +0 -1
- package/dist/index-DVDCrfkv.d.mts.map +0 -1
- package/dist/orchestrator-BeTmVk54.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -115,38 +115,29 @@ fixtures:
|
|
|
115
115
|
- **Tests (`msw/node`)** — pass `setupMockHandlers()` from
|
|
116
116
|
`@zitadel/api-mock` into `setupServer(...)`.
|
|
117
117
|
`getCapturedRequests()` exposes captured request bodies for assertions.
|
|
118
|
-
- **
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
- **Browser (`msw/browser`)** — `setupMock(worker)` wires the handlers into a
|
|
119
|
+
`msw/browser` worker. The Storybook orchestrator stories take the equivalent
|
|
120
|
+
path through `msw-storybook-addon` (see
|
|
121
|
+
[`apps/storybook/src/orchestrator.stories.ts`](../../apps/storybook/src/orchestrator.stories.ts)).
|
|
122
|
+
`applyBranding(...)` injects a tenant branding overlay merged into every
|
|
123
|
+
response (presets include `font_url` for Inter).
|
|
122
124
|
- **Framework demos (TCP server)** — `moon run api-mock:start`
|
|
123
125
|
serves the same handlers on port 4000 with `defaultDevBranding` (Arimo
|
|
124
126
|
`font_url`) applied at boot. See [`apps/demo-next`](../../apps/demo-next/README.md)
|
|
125
127
|
and [`apps/demo-nuxt`](../../apps/demo-nuxt/README.md).
|
|
126
128
|
|
|
127
|
-
###
|
|
129
|
+
### Preview surfaces
|
|
128
130
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
| **Lit playground** | `moon run components:dev` | [login](http://localhost:5173/?route=login) · [atoms](http://localhost:5173/?route=atoms) | Component author surface: branding presets, event log, source TS from `src/`. MSW runs in the browser — no TCP mock server. |
|
|
135
|
-
| **React console playground** | `moon run console:dev` | [http://localhost:5174](http://localhost:5174) | `@zitadel/ui-react` atom matrices in the pre-release console shell. MSW in `import.meta.env.DEV`. Compare against Lit `:5173/?route=atoms` in a second tab. |
|
|
136
|
-
| **demo-next** | `moon run api-mock:start` + `ZITADEL_URL=http://localhost:4000 moon run demo-next:dev` | [http://localhost:3002/login](http://localhost:3002/login) (mock on `:4000`) | Next.js SDK, middleware, cookies, built `dist/`. See [`apps/demo-next`](../../apps/demo-next/README.md). |
|
|
137
|
-
| **demo-nuxt** | mock on `:4000`, then `ZITADEL_URL=http://localhost:4000 moon run demo-nuxt:dev` | [http://localhost:3001/login](http://localhost:3001/login) | Nuxt SDK, middleware, cookies, built `dist/`. See [`apps/demo-nuxt`](../../apps/demo-nuxt/README.md). |
|
|
138
|
-
|
|
139
|
-
The Lit dev playground iterates on `<zl-*>` source; the React console
|
|
140
|
-
playground exercises `@zitadel/ui-react` in the internal shell.
|
|
141
|
-
When tweaking Lit visuals or shadow-DOM behaviour, use `:5173` first —
|
|
142
|
-
it round-trips faster. For React pair tweaks, use `:5174`.
|
|
131
|
+
| Surface | Moon command | What it gives you |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| **Storybook** | `moon run storybook:dev` ([:6006](http://localhost:6006)) | The workbench for both the Lit atoms and the paired React components, plus the `<zitadel-login>` orchestrator (MSW via `msw-storybook-addon`, flow/branding as controls). |
|
|
134
|
+
| **demo-next** | `moon run api-mock:start` + `ZITADEL_URL=http://localhost:4000 moon run demo-next:dev` | Next.js SDK, middleware, cookies, built `dist/` ([:3002/login](http://localhost:3002/login)). See [`apps/demo-next`](../../apps/demo-next/README.md). |
|
|
135
|
+
| **demo-nuxt** | mock on `:4000`, then `ZITADEL_URL=http://localhost:4000 moon run demo-nuxt:dev` | Nuxt SDK, middleware, cookies, built `dist/` ([:3001/login](http://localhost:3001/login)). See [`apps/demo-nuxt`](../../apps/demo-nuxt/README.md). |
|
|
143
136
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Console (`:5174`) will not pick up Lit-only edits until you rebuild or
|
|
149
|
-
change the paired React/CSS path.
|
|
137
|
+
Storybook consumes the built `@zitadel/components` / `@zitadel/ui-react`
|
|
138
|
+
artifacts, so rebuild after source changes (`moon run components:build`) or
|
|
139
|
+
keep the Storybook dev server running — its tasks depend on the relevant
|
|
140
|
+
build tasks.
|
|
150
141
|
|
|
151
142
|
### Atoms-only (bypass the orchestrator)
|
|
152
143
|
|
|
@@ -280,11 +271,6 @@ See [`src/atoms/`](src/atoms) for full TypeScript types and JSDoc.
|
|
|
280
271
|
|
|
281
272
|
```
|
|
282
273
|
packages/components/
|
|
283
|
-
├── dev/ Vite playground (atoms + login routes)
|
|
284
|
-
│ ├── index.html
|
|
285
|
-
│ ├── main.ts bootstraps @zitadel/api-mock + MSW worker
|
|
286
|
-
│ ├── branding-presets.ts tenant-style branding payloads
|
|
287
|
-
│ └── pages/ atom playground + <zitadel-login> demo
|
|
288
274
|
├── src/
|
|
289
275
|
│ ├── atoms/ zl-field, zl-button, zl-alert, zl-icon, zl-pill,
|
|
290
276
|
│ │ zl-card, zl-page-shell + tests
|
|
@@ -296,10 +282,12 @@ packages/components/
|
|
|
296
282
|
│ ├── manifests.ts per-atom attribute / part / event manifests
|
|
297
283
|
│ └── index.ts barrel
|
|
298
284
|
├── tsdown.config.ts library build (externalises lit/liquidjs/dompurify)
|
|
299
|
-
├── vite.config.mts dev server
|
|
300
285
|
└── vitest.config.ts jsdom (unit) + chromium (browser) projects
|
|
301
286
|
```
|
|
302
287
|
|
|
288
|
+
The interactive workbench (atoms, paired React, and the `<zitadel-login>`
|
|
289
|
+
orchestrator) lives in [`apps/storybook`](../../apps/storybook/README.md).
|
|
290
|
+
|
|
303
291
|
## Develop
|
|
304
292
|
|
|
305
293
|
Use **Moon** for tasks in this monorepo (`moon run <project>:<task>`).
|
|
@@ -311,16 +299,11 @@ documented path.
|
|
|
311
299
|
# install once at the repo root
|
|
312
300
|
corepack pnpm install
|
|
313
301
|
|
|
314
|
-
# ---
|
|
315
|
-
|
|
316
|
-
# Lit: atoms + login, in-browser MSW
|
|
317
|
-
moon run components:dev
|
|
318
|
-
# → http://localhost:5173/?route=login
|
|
319
|
-
# → http://localhost:5173/?route=atoms
|
|
302
|
+
# --- Workbench ---
|
|
320
303
|
|
|
321
|
-
#
|
|
322
|
-
moon run
|
|
323
|
-
# → http://localhost:
|
|
304
|
+
# Storybook: atoms, paired React, and the <zitadel-login> orchestrator
|
|
305
|
+
moon run storybook:dev
|
|
306
|
+
# → http://localhost:6006
|
|
324
307
|
|
|
325
308
|
# Framework demos (TCP mock + SDK) — see apps/demo-*/README.md
|
|
326
309
|
# moon run api-mock:start # → http://localhost:4000
|
|
@@ -335,8 +318,8 @@ moon run components:typecheck
|
|
|
335
318
|
moon run components:build
|
|
336
319
|
```
|
|
337
320
|
|
|
338
|
-
|
|
339
|
-
|
|
321
|
+
Storybook loads the built `dist/`, so run `moon run components:build` after
|
|
322
|
+
source changes (its Storybook tasks already depend on the build).
|
|
340
323
|
|
|
341
324
|
**Framework demos** need the TCP mock plus a rebuild after orchestrator changes —
|
|
342
325
|
see [`apps/demo-next/README.md`](../../apps/demo-next/README.md) and
|
package/dist/atoms/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { IconName, ZlAlert, ZlButton, ZlCard, ZlField, ZlFieldType, ZlIcon, ZlPageShell, ZlPasskey, ZlPasskeyErrorDetail, ZlPasskeyResultDetail, ZlPill, zlAlertManifest, zlButtonManifest, zlCardManifest, zlFieldManifest, zlIconManifest, zlPageShellManifest, zlPasskeyManifest, zlPillManifest };
|
|
1
|
+
import { $t as zlButtonManifest, Jt as ZlCheckboxChangeDetail, Qt as ZlButton, Xt as ZlCard, Yt as zlCheckboxManifest, Zt as zlCardManifest, a as ZlPill, c as ZlPasskeyErrorDetail, d as ZlPageShell, en as ZlAlert, f as zlPageShellManifest, h as zlFieldManifest, i as zlSelectManifest, in as zlIconManifest, l as ZlPasskeyResultDetail, m as ZlFieldType, n as ZlSelectChangeDetail, nn as IconName, o as zlPillManifest, p as ZlField, qt as ZlCheckbox, r as ZlSelectOption, rn as ZlIcon, s as ZlPasskey, t as ZlSelect, tn as zlAlertManifest, u as zlPasskeyManifest } from "../index-D4LkdeFl.mjs";
|
|
2
|
+
export { IconName, ZlAlert, ZlButton, ZlCard, ZlCheckbox, ZlCheckboxChangeDetail, ZlField, ZlFieldType, ZlIcon, ZlPageShell, ZlPasskey, ZlPasskeyErrorDetail, ZlPasskeyResultDetail, ZlPill, ZlSelect, ZlSelectChangeDetail, ZlSelectOption, zlAlertManifest, zlButtonManifest, zlCardManifest, zlCheckboxManifest, zlFieldManifest, zlIconManifest, zlPageShellManifest, zlPasskeyManifest, zlPillManifest, zlSelectManifest };
|
package/dist/atoms/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { ZlAlert, ZlButton, ZlCard, ZlField, ZlIcon, ZlPageShell, ZlPasskey, ZlPill, zlAlertManifest, zlButtonManifest, zlCardManifest, zlFieldManifest, zlIconManifest, zlPageShellManifest, zlPasskeyManifest, zlPillManifest };
|
|
1
|
+
import { _ as ZlAlert, a as ZlPasskey, b as zlIconManifest, c as zlPageShellManifest, d as ZlCheckbox, f as zlCheckboxManifest, g as zlButtonManifest, h as ZlButton, i as zlPillManifest, l as ZlField, m as zlCardManifest, n as zlSelectManifest, o as zlPasskeyManifest, p as ZlCard, r as ZlPill, s as ZlPageShell, t as ZlSelect, u as zlFieldManifest, v as zlAlertManifest, y as ZlIcon } from "../atoms-BSwVl736.mjs";
|
|
2
|
+
export { ZlAlert, ZlButton, ZlCard, ZlCheckbox, ZlField, ZlIcon, ZlPageShell, ZlPasskey, ZlPill, ZlSelect, zlAlertManifest, zlButtonManifest, zlCardManifest, zlCheckboxManifest, zlFieldManifest, zlIconManifest, zlPageShellManifest, zlPasskeyManifest, zlPillManifest, zlSelectManifest };
|