docs: document shared web-ui components
This commit is contained in:
1 parent
b85601ae32
commit
cb23889dba
1 file changed
+33
-1
@@ -20,13 +20,45 @@ The single source of truth for code reused across every project in this workspac
|
|||||||
| Package | Language | Purpose |
|
| Package | Language | Purpose |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `@gabriel20xx/design-tokens` | CSS | Colors, typography, spacing, radii, shadows, light/dark theme variables. |
|
| `@gabriel20xx/design-tokens` | CSS | Colors, typography, spacing, radii, shadows, light/dark theme variables. |
|
||||||
| `@gabriel20xx/web-ui` | Svelte | Application shell, header/navigation, auth screens, dialogs, buttons, cards, badges. |
|
| `@gabriel20xx/web-ui` | Svelte | Shared application shell and reusable UI components. The complete public component inventory is documented below. |
|
||||||
| `@gabriel20xx/legacy-assets` | Browser JS/CSS | Legacy client-side assets, kept for a handful of older pages. |
|
| `@gabriel20xx/legacy-assets` | Browser JS/CSS | Legacy client-side assets, kept for a handful of older pages. |
|
||||||
| `repos.gfranz.ch/Gabriel20xx/shared/backend` | Go | Env config, `pgx` pools/transactions, auth persistence, an AuthGuard client (`authclient`), log shipping (`logshipper`), embedded Goose migrations, and the media-family's shared route/table surface (`mediaauth`, `mediacore`, `carriernodeclient`, `syncsocket`). |
|
| `repos.gfranz.ch/Gabriel20xx/shared/backend` | Go | Env config, `pgx` pools/transactions, auth persistence, an AuthGuard client (`authclient`), log shipping (`logshipper`), embedded Goose migrations, and the media-family's shared route/table surface (`mediaauth`, `mediacore`, `carriernodeclient`, `syncsocket`). |
|
||||||
| `@gabriel20xx/node-backend` | Node.js | `pg` pool/config/transactions/migrations, auth/session persistence, an AuthGuard client. |
|
| `@gabriel20xx/node-backend` | Node.js | `pg` pool/config/transactions/migrations, auth/session persistence, an AuthGuard client. |
|
||||||
| `gabriel20xx-shared-backend` | Python | `asyncpg` pool/config, auth/session persistence, an AuthGuard client. |
|
| `gabriel20xx-shared-backend` | Python | `asyncpg` pool/config, auth/session persistence, an AuthGuard client. |
|
||||||
| `com.gabriel20xx.shared.auth` | Java | An AuthGuard client, mirroring the Go/Node/Python ones. |
|
| `com.gabriel20xx.shared.auth` | Java | An AuthGuard client, mirroring the Go/Node/Python ones. |
|
||||||
|
|
||||||
|
### Public `web-ui` components
|
||||||
|
|
||||||
|
These are the complete Svelte component exports from `packages/web-ui/src/lib/index.ts` (23 components):
|
||||||
|
|
||||||
|
| Component | Includes |
|
||||||
|
|---|---|
|
||||||
|
| `AboutDialog` | About modal with application branding, description, version, links, and custom content. |
|
||||||
|
| `AppShell` | Application layout that composes the header, page header, notification stack, theme, and primary-color handling. |
|
||||||
|
| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. |
|
||||||
|
| `Badge` | Small inline label with default, primary, success, warning, and danger variants. |
|
||||||
|
| `Button` | Button with primary, secondary, outline, ghost, and danger variants; multiple sizes and full-width mode. |
|
||||||
|
| `Card` | Styled content section for grouping application content. |
|
||||||
|
| `Dialog` | Generic modal dialog with title, description, body, footer, and bindable open state. |
|
||||||
|
| `EmptyState` | Empty-content message with an inbox icon, title, and description. |
|
||||||
|
| `Header` | Branded application header with navigation, icons, actions, profile/settings menus, and logout. |
|
||||||
|
| `MediaPlayer` | Audio/video player with playback, seeking, volume, quality, fullscreen, keyboard controls, and custom end controls. |
|
||||||
|
| `MediaPlayerControls` | Reusable media controls for playback, seeking, volume, quality, fullscreen, optional graph toggling, and custom end controls. |
|
||||||
|
| `Metric` | Labeled metric/value display with optional detail and semantic variants. |
|
||||||
|
| `NotificationStack` | Global stack of dismissible success, error, warning, and informational notifications. |
|
||||||
|
| `PageHeader` | Page title with optional subtitle/description, child content, and action area. |
|
||||||
|
| `Pagination` | Page navigation and page-size selection with total/item counts. |
|
||||||
|
| `PrimaryColorPicker` | Per-project primary-color selector backed by the shared color persistence helpers. |
|
||||||
|
| `ProfileDialog` | Profile username/email/password editing and TOTP settings. |
|
||||||
|
| `SectionTitle` | Section heading with optional description. |
|
||||||
|
| `SettingsDialog` | Generic settings modal with custom content or a default empty-settings message. |
|
||||||
|
| `StatusDialog` | Detailed service health/readiness status modal with refresh support. |
|
||||||
|
| `StatusWidget` | Header-friendly health/readiness indicator that polls `/healthz` and `/ready` and opens `StatusDialog`. |
|
||||||
|
| `TotpSettings` | TOTP status, setup, enable, and disable controls. |
|
||||||
|
| `UserManagement` | Role-aware user administration with listing, creation, editing, deletion, project scopes, and pagination. |
|
||||||
|
|
||||||
|
This inventory describes the public component API only; the package also exports notification helpers, primary-color helpers, and TypeScript types. When a public component is added, removed, renamed, or materially changes responsibility, update this table in the same change as `packages/web-ui/src/lib/index.ts`. Keep the table aligned with that barrel file, and do not add internal or generated components to it.
|
||||||
|
|
||||||
The `web-ui` components don't import `$app/state`, `$lib` stores, or a project-specific API — applications provide those through props and callbacks.
|
The `web-ui` components don't import `$app/state`, `$lib` stores, or a project-specific API — applications provide those through props and callbacks.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in new issue
Block a user