feat(schemas): add repository settings and user restore token fields

- Add allow_forking, allow_merge_commit, allow_rebase_merge, allow_squash_merge fields to repo schemas
- Add delete_branch_on_merge field to repository models and schemas
- Add has_issues, has_pull_requests, has_wiki, homepage fields to repo schemas
- Add topics array field to repository schemas and models
- Add restore_token_expires_at and restore_token_hash fields to user schemas
- Remove UserAvatarResponse and UploadUserAvatarParams schemas completely
- Update CreateRepoParams and UpdateRepoParams with new repository settings
- Modify CreateTemplateParams and UpdateTemplateParams with notification template fields
- Remove description from SetBranchProtectionParams schema
- Delete App.css and auth.css files completely
- Update App.tsx with routing migration notes
This commit is contained in:
zhenyi
2026-06-11 23:12:24 +08:00
parent defde2bca9
commit d7c4bc7c8e
582 changed files with 49188 additions and 3037 deletions
+267
View File
@@ -0,0 +1,267 @@
---
name: shadcn
description: Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
user-invocable: false
allowed-tools: Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *), Bash(bunx --bun shadcn@latest *)
---
# shadcn/ui
A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI.
> **IMPORTANT:** Run all CLI commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest` — based on the project's `packageManager`. Examples below use `npx shadcn@latest` but substitute the correct runner for the project.
## Current Project Context
```json
!`npx shadcn@latest info --json`
```
The JSON above contains the project config and installed components. Use `npx shadcn@latest docs <component>` to get documentation and example URLs for any component.
## Principles
1. **Use existing components first.** Use `npx shadcn@latest search` to check registries before writing custom UI. Check community registries too.
2. **Compose, don't reinvent.** Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
3. **Use built-in variants before custom styles.** `variant="outline"`, `size="sm"`, etc.
4. **Use semantic colors.** `bg-primary`, `text-muted-foreground` — never raw values like `bg-blue-500`.
## Critical Rules
These rules are **always enforced**. Each links to a file with Incorrect/Correct code pairs.
### Styling & Tailwind → [styling.md](./rules/styling.md)
- **`className` for layout, not styling.** Never override component colors or typography.
- **No `space-x-*` or `space-y-*`.** Use `flex` with `gap-*`. For vertical stacks, `flex flex-col gap-*`.
- **Use `size-*` when width and height are equal.** `size-10` not `w-10 h-10`.
- **Use `truncate` shorthand.** Not `overflow-hidden text-ellipsis whitespace-nowrap`.
- **No manual `dark:` color overrides.** Use semantic tokens (`bg-background`, `text-muted-foreground`).
- **Use `cn()` for conditional classes.** Don't write manual template literal ternaries.
- **No manual `z-index` on overlay components.** Dialog, Sheet, Popover, etc. handle their own stacking.
### Forms & Inputs → [forms.md](./rules/forms.md)
- **Forms use `FieldGroup` + `Field`.** Never use raw `div` with `space-y-*` or `grid gap-*` for form layout.
- **`InputGroup` uses `InputGroupInput`/`InputGroupTextarea`.** Never raw `Input`/`Textarea` inside `InputGroup`.
- **Buttons inside inputs use `InputGroup` + `InputGroupAddon`.**
- **Option sets (27 choices) use `ToggleGroup`.** Don't loop `Button` with manual active state.
- **`FieldSet` + `FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading.
- **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control.
### Component Structure → [composition.md](./rules/composition.md)
- **Items always inside their Group.** `SelectItem``SelectGroup`. `DropdownMenuItem``DropdownMenuGroup`. `CommandItem``CommandGroup`.
- **Use `asChild` (radix) or `render` (base) for custom triggers.** Check `base` field from `npx shadcn@latest info`. → [base-vs-radix.md](./rules/base-vs-radix.md)
- **Dialog, Sheet, and Drawer always need a Title.** `DialogTitle`, `SheetTitle`, `DrawerTitle` required for accessibility. Use `className="sr-only"` if visually hidden.
- **Use full Card composition.** `CardHeader`/`CardTitle`/`CardDescription`/`CardContent`/`CardFooter`. Don't dump everything in `CardContent`.
- **Button has no `isPending`/`isLoading`.** Compose with `Spinner` + `data-icon` + `disabled`.
- **`TabsTrigger` must be inside `TabsList`.** Never render triggers directly in `Tabs`.
- **`Avatar` always needs `AvatarFallback`.** For when the image fails to load.
### Use Components, Not Custom Markup → [composition.md](./rules/composition.md)
- **Use existing components before custom markup.** Check if a component exists before writing a styled `div`.
- **Callouts use `Alert`.** Don't build custom styled divs.
- **Empty states use `Empty`.** Don't build custom empty state markup.
- **Toast via `sonner`.** Use `toast()` from `sonner`.
- **Use `Separator`** instead of `<hr>` or `<div className="border-t">`.
- **Use `Skeleton`** for loading placeholders. No custom `animate-pulse` divs.
- **Use `Badge`** instead of custom styled spans.
### Icons → [icons.md](./rules/icons.md)
- **Icons in `Button` use `data-icon`.** `data-icon="inline-start"` or `data-icon="inline-end"` on the icon.
- **No sizing classes on icons inside components.** Components handle icon sizing via CSS. No `size-4` or `w-4 h-4`.
- **Pass icons as objects, not string keys.** `icon={CheckIcon}`, not a string lookup.
### CLI
- **Never decode preset codes or build preset URLs manually.** Use `npx shadcn@latest preset decode <code>`, `preset url <code>`, or `preset open <code>`. For project-aware preset detection, use `npx shadcn@latest preset resolve`.
- **Apply preset codes directly with the CLI.** Use `npx shadcn@latest apply <code>` for existing projects, or `npx shadcn@latest init --preset <code>` when initializing.
## Key Patterns
These are the most common patterns that differentiate correct shadcn/ui code. For edge cases, see the linked rule files above.
```tsx
// Form layout: FieldGroup + Field, not div + Label.
<FieldGroup>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input id="email" />
</Field>
</FieldGroup>
// Validation: data-invalid on Field, aria-invalid on the control.
<Field data-invalid>
<FieldLabel>Email</FieldLabel>
<Input aria-invalid />
<FieldDescription>Invalid email.</FieldDescription>
</Field>
// Icons in buttons: data-icon, no sizing classes.
<Button>
<SearchIcon data-icon="inline-start" />
Search
</Button>
// Spacing: gap-*, not space-y-*.
<div className="flex flex-col gap-4"> // correct
<div className="space-y-4"> // wrong
// Equal dimensions: size-*, not w-* h-*.
<Avatar className="size-10"> // correct
<Avatar className="w-10 h-10"> // wrong
// Status colors: Badge variants or semantic tokens, not raw colors.
<Badge variant="secondary">+20.1%</Badge> // correct
<span className="text-emerald-600">+20.1%</span> // wrong
```
## Component Selection
| Need | Use |
| -------------------------- | --------------------------------------------------------------------------------------------------- |
| Button/action | `Button` with appropriate variant |
| Form inputs | `Input`, `Select`, `Combobox`, `Switch`, `Checkbox`, `RadioGroup`, `Textarea`, `InputOTP`, `Slider` |
| Toggle between 25 options | `ToggleGroup` + `ToggleGroupItem` |
| Data display | `Table`, `Card`, `Badge`, `Avatar` |
| Navigation | `Sidebar`, `NavigationMenu`, `Breadcrumb`, `Tabs`, `Pagination` |
| Overlays | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
| Feedback | `sonner` (toast), `Alert`, `Progress`, `Skeleton`, `Spinner` |
| Command palette | `Command` inside `Dialog` |
| Charts | `Chart` (wraps Recharts) |
| Layout | `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
| Empty states | `Empty` |
| Menus | `DropdownMenu`, `ContextMenu`, `Menubar` |
| Tooltips/info | `Tooltip`, `HoverCard`, `Popover` |
## Key Fields
The injected project context contains these key fields:
- **`aliases`** → use the actual alias prefix for imports (e.g. `@/`, `~/`), never hardcode.
- **`isRSC`** → when `true`, components using `useState`, `useEffect`, event handlers, or browser APIs need `"use client"` at the top of the file. Always reference this field when advising on the directive.
- **`tailwindVersion`** → `"v4"` uses `@theme inline` blocks; `"v3"` uses `tailwind.config.js`.
- **`tailwindCssFile`** → the global CSS file where custom CSS variables are defined. Always edit this file, never create a new one.
- **`style`** → component visual treatment (e.g. `nova`, `vega`).
- **`base`** → primitive library (`radix` or `base`). Affects component APIs and available props.
- **`iconLibrary`** → determines icon imports. Use `lucide-react` for `lucide`, `@tabler/icons-react` for `tabler`, etc. Never assume `lucide-react`.
- **`resolvedPaths`** → exact file-system destinations for components, utils, hooks, etc.
- **`framework`** → routing and file conventions (e.g. Next.js App Router vs Vite SPA).
- **`packageManager`** → use this for any non-shadcn dependency installs (e.g. `pnpm add date-fns` vs `npm install date-fns`).
- **`preset`** → resolved preset code and values for the current project. Use `npx shadcn@latest preset resolve --json` when you only need preset information.
See [cli.md — `info` command](./cli.md) for the full field reference.
## Component Docs, Examples, and Usage
Run `npx shadcn@latest docs <component>` to get the URLs for a component's documentation, examples, and API reference. Fetch these URLs to get the actual content.
```bash
npx shadcn@latest docs button dialog select
```
**When creating, fixing, debugging, or using a component, always run `npx shadcn@latest docs` and fetch the URLs first.** This ensures you're working with the correct API and usage patterns rather than guessing.
## Workflow
1. **Get project context** — already injected above. Run `npx shadcn@latest info` again if you need to refresh.
2. **Check installed components first** — before running `add`, always check the `components` list from project context or list the `resolvedPaths.ui` directory. Don't import components that haven't been added, and don't re-add ones already installed.
3. **Find components**`npx shadcn@latest search`.
4. **Get docs and examples** — run `npx shadcn@latest docs <component>` to get URLs, then fetch them. Use `npx shadcn@latest view` to browse registry items you haven't installed. To preview changes to installed components, use `npx shadcn@latest add --diff`.
5. **Install or update**`npx shadcn@latest add`. When updating existing components, use `--dry-run` and `--diff` to preview changes first (see [Updating Components](#updating-components) below).
6. **Fix imports in third-party components** — After adding components from community registries (e.g. `@bundui`, `@magicui`), check the added non-UI files for hardcoded import paths like `@/components/ui/...`. These won't match the project's actual aliases. Use `npx shadcn@latest info` to get the correct `ui` alias (e.g. `@workspace/ui/components`) and rewrite the imports accordingly. The CLI rewrites imports for its own UI files, but third-party registry components may use default paths that don't match the project.
7. **Review added components** — After adding a component or block from any registry, **always read the added files and verify they are correct**. Check for missing sub-components (e.g. `SelectItem` without `SelectGroup`), missing imports, incorrect composition, or violations of the [Critical Rules](#critical-rules). Also replace any icon imports with the project's `iconLibrary` from the project context (e.g. if the registry item uses `lucide-react` but the project uses `hugeicons`, swap the imports and icon names accordingly). Fix all issues before moving on.
8. **Registry must be explicit** — When the user asks to add a block or component, **do not guess the registry**. If no registry is specified (e.g. user says "add a login block" without specifying `@shadcn`, `@tailark`, `owner/repo`, etc.), ask which registry to use. Never default to a registry on behalf of the user.
9. **Switching presets** — Ask the user first: **overwrite**, **partial**, **merge**, or **skip**?
- **Inspect current preset**: `npx shadcn@latest preset resolve`. Use `--json` when you need structured values.
- **Inspect incoming preset**: `npx shadcn@latest preset decode <code>`. Use `preset url <code>` or `preset open <code>` to share or open the preset builder.
- **Overwrite**: `npx shadcn@latest apply <code>`. Overwrites detected components, fonts, and CSS variables.
- **Partial**: `npx shadcn@latest apply <code> --only theme,font`. Updates only the selected preset parts without reinstalling UI components. Supported values are `theme` and `font`; comma-separated combinations are allowed. `icon` is intentionally not supported, because icon changes may require full component reinstall and transforms.
- **Merge**: `npx shadcn@latest init --preset <code> --force --no-reinstall`, then run `npx shadcn@latest info` to list installed components, then for each installed component use `--dry-run` and `--diff` to [smart merge](#updating-components) it individually.
- **Skip**: `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS, leaves components as-is.
- **Important**: Always run preset commands inside the user's project directory. `apply` only works in an existing project with a `components.json` file. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
## Updating Components
When the user asks to update a component from upstream while keeping their local changes, use `--dry-run` and `--diff` to intelligently merge. **NEVER fetch raw files from GitHub manually — always use the CLI.**
1. Run `npx shadcn@latest add <component> --dry-run` to see all files that would be affected.
2. For each file, run `npx shadcn@latest add <component> --diff <file>` to see what changed upstream vs local.
3. Decide per file based on the diff:
- No local changes → safe to overwrite.
- Has local changes → read the local file, analyze the diff, and apply upstream updates while preserving local modifications.
- User says "just update everything" → use `--overwrite`, but confirm first.
4. **Never use `--overwrite` without the user's explicit approval.**
## Quick Reference
```bash
# Create a new project.
npx shadcn@latest init --name my-app --preset base-nova
npx shadcn@latest init --name my-app --preset a2r6bw --template vite
# Create a monorepo project.
npx shadcn@latest init --name my-app --preset base-nova --monorepo
npx shadcn@latest init --name my-app --preset base-nova --template next --monorepo
# Initialize existing project.
npx shadcn@latest init --preset base-nova
npx shadcn@latest init --defaults # shortcut: --template=next --preset=nova (base style implied)
# Apply a preset to an existing project.
npx shadcn@latest apply a2r6bw
npx shadcn@latest apply a2r6bw --only theme
npx shadcn@latest apply a2r6bw --only font
npx shadcn@latest apply a2r6bw --only theme,font
# Inspect preset codes and project preset state.
npx shadcn@latest preset decode a2r6bw
npx shadcn@latest preset url a2r6bw
npx shadcn@latest preset open a2r6bw
npx shadcn@latest preset resolve
npx shadcn@latest preset resolve --json
# Add components.
npx shadcn@latest add button card dialog
npx shadcn@latest add @magicui/shimmer-button
npx shadcn@latest add owner/repo/item
npx shadcn@latest add --all
# Preview changes before adding/updating.
npx shadcn@latest add button --dry-run
npx shadcn@latest add button --diff button.tsx
npx shadcn@latest add @acme/form --view button.tsx
npx shadcn@latest add owner/repo/item --dry-run
# Search registries.
npx shadcn@latest search @shadcn -q "sidebar"
npx shadcn@latest search @tailark -q "stats"
npx shadcn@latest search owner/repo -q "login"
npx shadcn@latest search # all configured registries
npx shadcn@latest search @shadcn -q "menu" -t ui # filter by item type
# Get component docs and example URLs.
npx shadcn@latest docs button dialog select
# View registry item details (for items not yet installed).
npx shadcn@latest view @shadcn/button
npx shadcn@latest view owner/repo/item
```
**Named presets:** `nova`, `vega`, `maia`, `lyra`, `mira`, `luma`
**Templates:** `next`, `vite`, `start`, `react-router`, `astro` (all support `--monorepo`) and `laravel` (not supported for monorepo)
**Preset codes:** Version-prefixed base62 strings (e.g. `a2r6bw` or `b0`), from [ui.shadcn.com](https://ui.shadcn.com).
## Detailed References
- [rules/forms.md](./rules/forms.md) — FieldGroup, Field, InputGroup, ToggleGroup, FieldSet, validation states
- [rules/composition.md](./rules/composition.md) — Groups, overlays, Card, Tabs, Avatar, Alert, Empty, Toast, Separator, Skeleton, Badge, Button loading
- [rules/icons.md](./rules/icons.md) — data-icon, icon sizing, passing icons as objects
- [rules/styling.md](./rules/styling.md) — Semantic colors, variants, className, spacing, size, truncate, dark mode, cn(), z-index
- [rules/base-vs-radix.md](./rules/base-vs-radix.md) — asChild vs render, Select, ToggleGroup, Slider, Accordion
- [cli.md](./cli.md) — Commands, flags, presets, templates
- [registry.md](./registry.md) — Authoring source registries, `include`, item definitions, dependencies, GitHub registry rules
- [customization.md](./customization.md) — Theming, CSS variables, extending components
+5
View File
@@ -0,0 +1,5 @@
interface:
display_name: "shadcn/ui"
short_description: "Manages shadcn/ui components — adding, searching, fixing, debugging, styling, and composing UI."
icon_small: "./assets/shadcn-small.png"
icon_large: "./assets/shadcn.png"
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

+290
View File
@@ -0,0 +1,290 @@
# shadcn CLI Reference
Configuration is read from `components.json`.
> **IMPORTANT:** Always run commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest`. Check `packageManager` from project context to choose the right one. Examples below use `npx shadcn@latest` but substitute the correct runner for the project.
> **IMPORTANT:** Only use the flags documented below. Do not invent or guess flags — if a flag isn't listed here, it doesn't exist. The CLI auto-detects the package manager from the project's lockfile; there is no `--package-manager` flag.
## Contents
- Commands: init, apply, add (dry-run, smart merge), search, view, docs, info, build
- Templates: next, vite, start, react-router, astro
- Presets: named, code, URL formats and fields
- Switching presets
---
## Commands
### `init` — Initialize or create a project
```bash
npx shadcn@latest init [components...] [options]
```
Initializes shadcn/ui in an existing project or creates a new project (when `--name` is provided). Optionally installs components in the same step.
| Flag | Short | Description | Default |
| ----------------------- | ----- | --------------------------------------------------------- | ------- |
| `--template <template>` | `-t` | Template (next, start, vite, next-monorepo, react-router) | — |
| `--preset [name]` | `-p` | Preset configuration (named, code, or URL) | — |
| `--yes` | `-y` | Skip confirmation prompt | `true` |
| `--defaults` | `-d` | Use defaults (`--template=next --preset=base-nova`) | `false` |
| `--force` | `-f` | Force overwrite existing configuration | `false` |
| `--cwd <cwd>` | `-c` | Working directory | current |
| `--name <name>` | `-n` | Name for new project | — |
| `--silent` | `-s` | Mute output | `false` |
| `--rtl` | | Enable RTL support | — |
| `--reinstall` | | Re-install existing UI components | `false` |
| `--monorepo` | | Scaffold a monorepo project | — |
| `--no-monorepo` | | Skip the monorepo prompt | — |
`npx shadcn@latest create` is an alias for `npx shadcn@latest init`.
### `apply` — Apply a preset to an existing project
```bash
npx shadcn@latest apply [preset] [options]
```
Applies a preset to an existing project, overwriting preset-driven config, fonts, CSS variables, and detected UI components.
| Flag | Short | Description | Default |
| ------------------- | ----- | ------------------------------------------ | ------- |
| `--preset <preset>` | — | Preset configuration (named, code, or URL) | — |
| `--yes` | `-y` | Skip confirmation prompt | `false` |
| `--cwd <cwd>` | `-c` | Working directory | current |
| `--silent` | `-s` | Mute output | `false` |
`[preset]` is a shorthand for `--preset <preset>`. If both are provided, they must match.
If no preset is provided, the CLI offers to open the custom preset builder on `ui.shadcn.com/create`.
### `add` — Add components
> **IMPORTANT:** To compare local components against upstream or to preview changes, ALWAYS use `npx shadcn@latest add <component> --dry-run`, `--diff`, or `--view`. NEVER fetch raw files from GitHub or other sources manually. The CLI handles registry resolution, file paths, and CSS diffing automatically.
```bash
npx shadcn@latest add [components...] [options]
```
Accepts component names, registry-prefixed names (`@magicui/shimmer-button`),
GitHub item addresses (`owner/repo/item`), URLs, or local paths.
| Flag | Short | Description | Default |
| --------------- | ----- | -------------------------------------------------------------------------------------------------------------------- | ------- |
| `--yes` | `-y` | Skip confirmation prompt | `false` |
| `--overwrite` | `-o` | Overwrite existing files | `false` |
| `--cwd <cwd>` | `-c` | Working directory | current |
| `--all` | `-a` | Add all available components | `false` |
| `--path <path>` | `-p` | Target path for the component | — |
| `--silent` | `-s` | Mute output | `false` |
| `--dry-run` | | Preview all changes without writing files | `false` |
| `--diff [path]` | | Show diffs. Without a path, shows the first 5 files. With a path, shows that file only (implies `--dry-run`) | — |
| `--view [path]` | | Show file contents. Without a path, shows the first 5 files. With a path, shows that file only (implies `--dry-run`) | — |
#### Dry-Run Mode
Use `--dry-run` to preview what `add` would do without writing any files. `--diff` and `--view` both imply `--dry-run`.
```bash
# Preview all changes.
npx shadcn@latest add button --dry-run
# Show diffs for all files (top 5).
npx shadcn@latest add button --diff
# Show the diff for a specific file.
npx shadcn@latest add button --diff button.tsx
# Show contents for all files (top 5).
npx shadcn@latest add button --view
# Show the full content of a specific file.
npx shadcn@latest add button --view button.tsx
# Works with URLs too.
npx shadcn@latest add https://api.npoint.io/abc123 --dry-run
# Works with public GitHub registries too.
npx shadcn@latest add owner/repo/item --dry-run
# CSS diffs.
npx shadcn@latest add button --diff globals.css
```
**When to use dry-run:**
- When the user asks "what files will this add?" or "what will this change?" — use `--dry-run`.
- Before overwriting existing components — use `--diff` to preview the changes first.
- When the user wants to inspect component source code without installing — use `--view`.
- When checking what CSS changes would be made to `globals.css` — use `--diff globals.css`.
- When the user asks to review or audit third-party registry code before installing — use `--view` to inspect the source.
> **`npx shadcn@latest add --dry-run` vs `npx shadcn@latest view`:** Prefer `npx shadcn@latest add --dry-run/--diff/--view` over `npx shadcn@latest view` when the user wants to preview changes to their project. `npx shadcn@latest view` only shows raw registry metadata. `npx shadcn@latest add --dry-run` shows exactly what would happen in the user's project: resolved file paths, diffs against existing files, and CSS updates. Use `npx shadcn@latest view` only when the user wants to browse registry info without a project context.
#### Smart Merge from Upstream
See [Updating Components in SKILL.md](./SKILL.md#updating-components) for the full workflow.
### `search` — Search registries
```bash
npx shadcn@latest search [registries...] [options]
```
Fuzzy search across registries. Also aliased as `npx shadcn@latest list`.
Supports namespaces (`@acme`), public GitHub registry sources (`owner/repo`),
and registry catalog URLs. Without `-q`, lists all items. When no registries are
passed, searches every registry configured in `components.json`.
| Flag | Short | Description | Default |
| ------------------- | ----- | ------------------------------------------------- | ------- |
| `--query <query>` | `-q` | Search query | — |
| `--type <type>` | `-t` | Filter by item type (e.g. `ui`, `block`, `hook`); comma-separated | — |
| `--limit <number>` | `-l` | Max items to display | `100` |
| `--offset <number>` | `-o` | Items to skip | `0` |
| `--json` | | Output as JSON | `false` |
| `--cwd <cwd>` | `-c` | Working directory | current |
### `view` — View item details
```bash
npx shadcn@latest view <items...> [options]
```
Displays item info including file contents. Examples:
`npx shadcn@latest view @shadcn/button`,
`npx shadcn@latest view owner/repo/item`.
### `docs` — Get component documentation URLs
```bash
npx shadcn@latest docs <components...> [options]
```
Outputs resolved URLs for component documentation, examples, and API references. Accepts one or more component names. Fetch the URLs to get the actual content.
Example output for `npx shadcn@latest docs input button`:
```
base radix
input
docs https://ui.shadcn.com/docs/components/radix/input
examples https://raw.githubusercontent.com/.../examples/input-example.tsx
button
docs https://ui.shadcn.com/docs/components/radix/button
examples https://raw.githubusercontent.com/.../examples/button-example.tsx
```
Some components include an `api` link to the underlying library (e.g. `cmdk` for the command component).
### `diff` — Check for updates
Do not use this command. Use `npx shadcn@latest add --diff` instead.
### `info` — Project information
```bash
npx shadcn@latest info [options]
```
Displays project info and `components.json` configuration. Run this first to discover the project's framework, aliases, Tailwind version, and resolved paths.
| Flag | Short | Description | Default |
| ------------- | ----- | ----------------- | ------- |
| `--cwd <cwd>` | `-c` | Working directory | current |
**Project Info fields:**
| Field | Type | Meaning |
| -------------------- | --------- | ------------------------------------------------------------------ |
| `framework` | `string` | Detected framework (`next`, `vite`, `react-router`, `start`, etc.) |
| `frameworkVersion` | `string` | Framework version (e.g. `15.2.4`) |
| `isSrcDir` | `boolean` | Whether the project uses a `src/` directory |
| `isRSC` | `boolean` | Whether React Server Components are enabled |
| `isTsx` | `boolean` | Whether the project uses TypeScript |
| `tailwindVersion` | `string` | `"v3"` or `"v4"` |
| `tailwindConfigFile` | `string` | Path to the Tailwind config file |
| `tailwindCssFile` | `string` | Path to the global CSS file |
| `aliasPrefix` | `string` | Import alias prefix (e.g. `@`, `~`, `@/`) |
| `packageManager` | `string` | Detected package manager (`npm`, `pnpm`, `yarn`, `bun`) |
**Components.json fields:**
| Field | Type | Meaning |
| -------------------- | --------- | ------------------------------------------------------------------------------------------ |
| `base` | `string` | Primitive library (`radix` or `base`) — determines component APIs and available props |
| `style` | `string` | Visual style (e.g. `nova`, `vega`) |
| `rsc` | `boolean` | RSC flag from config |
| `tsx` | `boolean` | TypeScript flag |
| `tailwind.config` | `string` | Tailwind config path |
| `tailwind.css` | `string` | Global CSS path — this is where custom CSS variables go |
| `iconLibrary` | `string` | Icon library — determines icon import package (e.g. `lucide-react`, `@tabler/icons-react`) |
| `aliases.components` | `string` | Component import alias (e.g. `@/components`) |
| `aliases.utils` | `string` | Utils import alias (e.g. `@/lib/utils`) |
| `aliases.ui` | `string` | UI component alias (e.g. `@/components/ui`) |
| `aliases.lib` | `string` | Lib alias (e.g. `@/lib`) |
| `aliases.hooks` | `string` | Hooks alias (e.g. `@/hooks`) |
| `resolvedPaths` | `object` | Absolute file-system paths for each alias |
| `registries` | `object` | Configured custom registries |
**Links fields:**
The `info` output includes a **Links** section with templated URLs for component docs, source, and examples. For resolved URLs, use `npx shadcn@latest docs <component>` instead.
### `build` — Build a custom registry
```bash
npx shadcn@latest build [registry] [options]
```
Builds `registry.json` into individual JSON files for distribution. Default input: `./registry.json`, default output: `./public/r`.
For authoring rules, `include`, item definitions, `registryDependencies`, and
GitHub registry behavior, see [registry.md](./registry.md).
| Flag | Short | Description | Default |
| ----------------- | ----- | ----------------- | ------------ |
| `--output <path>` | `-o` | Output directory | `./public/r` |
| `--cwd <cwd>` | `-c` | Working directory | current |
---
## Templates
| Value | Framework | Monorepo support |
| -------------- | -------------- | ---------------- |
| `next` | Next.js | Yes |
| `vite` | Vite | Yes |
| `start` | TanStack Start | Yes |
| `react-router` | React Router | Yes |
| `astro` | Astro | Yes |
| `laravel` | Laravel | No |
All templates support monorepo scaffolding via the `--monorepo` flag. When passed, the CLI uses a monorepo-specific template directory (e.g. `next-monorepo`, `vite-monorepo`). When neither `--monorepo` nor `--no-monorepo` is passed, the CLI prompts interactively. Laravel does not support monorepo scaffolding.
---
## Presets
Three ways to specify a preset via `--preset`:
1. **Named:** `--preset nova` or `--preset lyra`
2. **Code:** `--preset a2r6bw` (version-prefixed base62 string, e.g. `a2r6bw` or `b0`)
3. **URL:** `--preset "https://ui.shadcn.com/init?base=radix&style=nova&..."`
> **IMPORTANT:** Never try to decode, fetch, or resolve preset codes manually. Preset codes are opaque — pass them directly to `npx shadcn@latest init --preset <code>` and let the CLI handle resolution.
> Use `npx shadcn@latest apply --preset <code>` when overwriting an existing project's preset.
## Switching Presets
Ask the user first: **overwrite**, **merge**, or **skip** existing components?
- **Overwrite / Re-install** → `npx shadcn@latest apply --preset <code>`. Overwrites all detected component files with the new preset styles. Use when the user hasn't customized components.
- **Merge** → `npx shadcn@latest init --preset <code> --force --no-reinstall`, then run `npx shadcn@latest info` to get the list of installed components and use the [smart merge workflow](./SKILL.md#updating-components) to update them one by one, preserving local changes. Use when the user has customized components.
- **Skip** → `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS variables, leaves existing components as-is.
Always run preset commands inside the user's project directory. `apply` only works in an existing project with a `components.json` file. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
+209
View File
@@ -0,0 +1,209 @@
# Customization & Theming
Components reference semantic CSS variable tokens. Change the variables to change every component.
## Contents
- How it works (CSS variables → Tailwind utilities → components)
- Color variables and OKLCH format
- Dark mode setup
- Changing the theme (presets, CSS variables)
- Adding custom colors (Tailwind v3 and v4)
- Border radius
- Customizing components (variants, className, wrappers)
- Checking for updates
---
## How It Works
1. CSS variables defined in `:root` (light) and `.dark` (dark mode).
2. Tailwind maps them to utilities: `bg-primary`, `text-muted-foreground`, etc.
3. Components use these utilities — changing a variable changes all components that reference it.
---
## Color Variables
Every color follows the `name` / `name-foreground` convention. The base variable is for backgrounds, `-foreground` is for text/icons on that background.
| Variable | Purpose |
| -------------------------------------------- | -------------------------------- |
| `--background` / `--foreground` | Page background and default text |
| `--card` / `--card-foreground` | Card surfaces |
| `--primary` / `--primary-foreground` | Primary buttons and actions |
| `--secondary` / `--secondary-foreground` | Secondary actions |
| `--muted` / `--muted-foreground` | Muted/disabled states |
| `--accent` / `--accent-foreground` | Hover and accent states |
| `--destructive` / `--destructive-foreground` | Error and destructive actions |
| `--border` | Default border color |
| `--input` | Form input borders |
| `--ring` | Focus ring color |
| `--chart-1` through `--chart-5` | Chart/data visualization |
| `--sidebar-*` | Sidebar-specific colors |
| `--surface` / `--surface-foreground` | Secondary surface |
Colors use OKLCH: `--primary: oklch(0.205 0 0)` where values are lightness (01), chroma (0 = gray), and hue (0360).
---
## Dark Mode
Class-based toggle via `.dark` on the root element. In Next.js, use `next-themes`:
```tsx
import { ThemeProvider } from "next-themes"
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
{children}
</ThemeProvider>
```
---
## Changing the Theme
```bash
# Apply a preset code from ui.shadcn.com.
npx shadcn@latest apply --preset a2r6bw
# Positional shorthand also works.
npx shadcn@latest apply a2r6bw
# Switch to a named preset and overwrite existing components.
npx shadcn@latest apply --preset nova
# Preserve existing components instead.
npx shadcn@latest init --preset nova --force --no-reinstall
# Use a custom theme URL.
npx shadcn@latest apply --preset "https://ui.shadcn.com/init?base=radix&style=nova&theme=blue&..."
```
Or edit CSS variables directly in `globals.css`.
---
## Adding Custom Colors
Add variables to the file at `tailwindCssFile` from `npx shadcn@latest info` (typically `globals.css`). Never create a new CSS file for this.
```css
/* 1. Define in the global CSS file. */
:root {
--warning: oklch(0.84 0.16 84);
--warning-foreground: oklch(0.28 0.07 46);
}
.dark {
--warning: oklch(0.41 0.11 46);
--warning-foreground: oklch(0.99 0.02 95);
}
```
```css
/* 2a. Register with Tailwind v4 (@theme inline). */
@theme inline {
--color-warning: var(--warning);
--color-warning-foreground: var(--warning-foreground);
}
```
When `tailwindVersion` is `"v3"` (check via `npx shadcn@latest info`), register in `tailwind.config.js` instead:
```js
// 2b. Register with Tailwind v3 (tailwind.config.js).
module.exports = {
theme: {
extend: {
colors: {
warning: "oklch(var(--warning) / <alpha-value>)",
"warning-foreground":
"oklch(var(--warning-foreground) / <alpha-value>)",
},
},
},
}
```
```tsx
// 3. Use in components.
<div className="bg-warning text-warning-foreground">Warning</div>
```
---
## Border Radius
`--radius` controls border radius globally. Components derive values from it (`rounded-lg` = `var(--radius)`, `rounded-md` = `calc(var(--radius) - 2px)`).
---
## Customizing Components
See also: [rules/styling.md](./rules/styling.md) for Incorrect/Correct examples.
Prefer these approaches in order:
### 1. Built-in variants
```tsx
<Button variant="outline" size="sm">
Click
</Button>
```
### 2. Tailwind classes via `className`
```tsx
<Card className="mx-auto max-w-md">...</Card>
```
### 3. Add a new variant
Edit the component source to add a variant via `cva`:
```tsx
// components/ui/button.tsx
warning: "bg-warning text-warning-foreground hover:bg-warning/90",
```
### 4. Wrapper components
Compose shadcn/ui primitives into higher-level components:
```tsx
export function ConfirmDialog({ title, description, onConfirm, children }) {
return (
<AlertDialog>
<AlertDialogTrigger asChild>{children}</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>{title}</AlertDialogTitle>
<AlertDialogDescription>{description}</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction onClick={onConfirm}>Confirm</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
```
---
## Checking for Updates
```bash
npx shadcn@latest add button --diff
```
To preview exactly what would change before updating, use `--dry-run` and `--diff`:
```bash
npx shadcn@latest add button --dry-run # see all affected files
npx shadcn@latest add button --diff button.tsx # see the diff for a specific file
```
See [Updating Components in SKILL.md](./SKILL.md#updating-components) for the full smart merge workflow.
+47
View File
@@ -0,0 +1,47 @@
{
"skill_name": "shadcn",
"evals": [
{
"id": 1,
"prompt": "I'm building a Next.js app with shadcn/ui (base-nova preset, lucide icons). Create a settings form component with fields for: full name, email address, and notification preferences (email, SMS, push notifications as toggle options). Add validation states for required fields.",
"expected_output": "A React component using FieldGroup, Field, ToggleGroup, data-invalid/aria-invalid validation, gap-* spacing, and semantic colors.",
"files": [],
"expectations": [
"Uses FieldGroup and Field components for form layout instead of raw div with space-y",
"Uses Switch for independent on/off notification toggles (not looping Button with manual active state)",
"Uses data-invalid on Field and aria-invalid on the input control for validation states",
"Uses gap-* (e.g. gap-4, gap-6) instead of space-y-* or space-x-* for spacing",
"Uses semantic color tokens (e.g. bg-background, text-muted-foreground, text-destructive) instead of raw colors like bg-red-500",
"No manual dark: color overrides"
]
},
{
"id": 2,
"prompt": "Create a dialog component for editing a user profile. It should have the user's avatar at the top, input fields for name and bio, and Save/Cancel buttons with appropriate icons. Using shadcn/ui with radix-nova preset and tabler icons.",
"expected_output": "A React component with DialogTitle, Avatar+AvatarFallback, data-icon on icon buttons, no icon sizing classes, tabler icon imports.",
"files": [],
"expectations": [
"Includes DialogTitle for accessibility (visible or with sr-only class)",
"Avatar component includes AvatarFallback",
"Icons on buttons use the data-icon attribute (data-icon=\"inline-start\" or data-icon=\"inline-end\")",
"No sizing classes on icons inside components (no size-4, w-4, h-4, etc.)",
"Uses tabler icons (@tabler/icons-react) instead of lucide-react",
"Uses asChild for custom triggers (radix preset)"
]
},
{
"id": 3,
"prompt": "Create a dashboard component that shows 4 stat cards in a grid. Each card has a title, large number, percentage change badge, and a loading skeleton state. Using shadcn/ui with base-nova preset and lucide icons.",
"expected_output": "A React component with full Card composition, Skeleton for loading, Badge for changes, semantic colors, gap-* spacing.",
"files": [],
"expectations": [
"Uses full Card composition with CardHeader, CardTitle, CardContent (not dumping everything into CardContent)",
"Uses Skeleton component for loading placeholders instead of custom animate-pulse divs",
"Uses Badge component for percentage change instead of custom styled spans",
"Uses semantic color tokens instead of raw color values like bg-green-500 or text-red-600",
"Uses gap-* instead of space-y-* or space-x-* for spacing",
"Uses size-* when width and height are equal instead of separate w-* h-*"
]
}
]
}
+105
View File
@@ -0,0 +1,105 @@
# shadcn MCP Server
The CLI includes an MCP server that lets AI assistants search, browse, view, and install items from registries.
---
## Setup
```bash
shadcn mcp # start the MCP server (stdio)
shadcn mcp init # write config for your editor
```
Editor config files:
| Editor | Config file |
| ----------- | ------------------------------- |
| Claude Code | `.mcp.json` |
| Cursor | `.cursor/mcp.json` |
| VS Code | `.vscode/mcp.json` |
| OpenCode | `opencode.json` |
| Codex | `~/.codex/config.toml` (manual) |
---
## Tools
> **Tip:** MCP tools handle registry operations (search, view, install). For project configuration (aliases, framework, Tailwind version), use `npx shadcn@latest info` — there is no MCP equivalent.
### `shadcn:get_project_registries`
Returns registry names from `components.json`. Errors if no `components.json` exists.
**Input:** none
### `shadcn:list_items_in_registries`
Lists all items from one or more registries. Registries can be configured
namespaces such as `@acme`, public GitHub sources such as `owner/repo`, or
registry catalog URLs. Omit `registries` to list from every registry configured
in `components.json`.
**Input:** `registries` (string[], optional — omit for all configured), `types` (string[], optional — e.g. `["ui", "block"]`), `limit` (number, optional, defaults to 100), `offset` (number, optional)
### `shadcn:search_items_in_registries`
Fuzzy search across registries. Registries can be configured namespaces, public
GitHub sources, or registry catalog URLs. Omit `registries` to search every
registry configured in `components.json` — e.g. "find me a hero" across all
configured registries.
**Input:** `registries` (string[], optional — omit for all configured), `query` (string), `types` (string[], optional — e.g. `["ui", "block"]`), `limit` (number, optional, defaults to 100), `offset` (number, optional)
### `shadcn:view_items_in_registries`
View item details including full file contents.
**Input:** `items` (string[]) — e.g.
`["@shadcn/button", "@shadcn/card", "owner/repo/item"]`
### `shadcn:get_item_examples_from_registries`
Find usage examples and demos with source code. Omit `registries` to search
every registry configured in `components.json`.
**Input:** `registries` (string[], optional — omit for all configured), `query` (string) — e.g. `"accordion-demo"`, `"button example"`
### `shadcn:get_add_command_for_items`
Returns the CLI install command.
**Input:** `items` (string[]) — e.g. `["@shadcn/button"]`
### `shadcn:get_audit_checklist`
Returns a checklist for verifying components (imports, deps, lint, TypeScript).
**Input:** none
---
## Configuring Registries
Namespaced and authenticated registries are set in `components.json`. The
`@shadcn` registry is always built-in. Public GitHub registries can also be used
directly as `owner/repo` registry sources when the repository has a root
`registry.json`; they do not need `components.json` configuration.
```json
{
"registries": {
"@acme": "https://acme.com/r/{name}.json",
"@private": {
"url": "https://private.com/r/{name}.json",
"headers": { "Authorization": "Bearer ${MY_TOKEN}" }
}
}
}
```
- Names must start with `@`.
- URLs must contain `{name}`.
- `${VAR}` references are resolved from environment variables.
Community registry index: `https://ui.shadcn.com/r/registries.json`
+277
View File
@@ -0,0 +1,277 @@
# Registry Authoring and Addresses
Use this reference when the user wants to create, fix, publish, or reason about
a shadcn registry.
## Mental Model
A registry has two forms:
- **Source registry**: an authored `registry.json` in a project or repository.
It may use `include` and file paths that point at source files.
- **Built registry**: generated JSON files served to CLI consumers, usually
from `public/r`. Use `npx shadcn@latest build` to create this form.
The CLI installer consumes registry item payloads. A source registry is a way to
author those payloads from real files.
Registry items are not limited to React components. They can distribute
components, hooks, utilities, design tokens, pages, config files, docs, rules,
workflows, templates, MCP files, and other project files.
## Root `registry.json`
The root registry file should define registry metadata and either `items` or
`include`.
```json
{
"$schema": "https://ui.shadcn.com/schema/registry.json",
"name": "acme",
"homepage": "https://acme.com",
"items": [
{
"name": "absolute-url",
"type": "registry:lib",
"title": "Absolute URL",
"description": "A utility to turn any path into an absolute URL.",
"files": [
{
"path": "lib/absolute-url.ts",
"type": "registry:lib"
}
]
}
]
}
```
Root registry rules:
- Root `registry.json` must include `name` and `homepage`.
- `items` is an array of registry item definitions.
- `include` may be used to split the source registry into multiple files.
- Included registry files may omit `name` and `homepage`.
## Include
Use `include` to keep large registries modular.
```json
{
"$schema": "https://ui.shadcn.com/schema/registry.json",
"name": "acme",
"homepage": "https://acme.com",
"include": ["registry/ui/registry.json", "registry/blocks/registry.json"]
}
```
Include rules:
- Include paths are relative to the `registry.json` that declares them.
- Include paths must explicitly point to a `registry.json` file.
- Do not use remote URLs, absolute paths, or parent traversal (`..`).
- Item file paths are relative to the registry file that declares the item.
- Duplicate item names fail across the resolved registry.
Example included file:
```json
{
"items": [
{
"name": "button",
"type": "registry:ui",
"files": [
{
"path": "button.tsx",
"type": "registry:ui"
}
]
}
]
}
```
If this file is at `registry/ui/registry.json`, then `button.tsx` is read from
`registry/ui/button.tsx`, and the built item path is emitted relative to the
root registry.
## Item Definitions
Common item fields:
```json
{
"name": "login-form",
"type": "registry:block",
"title": "Login Form",
"description": "A login form with email and password fields.",
"dependencies": ["zod"],
"registryDependencies": ["button", "input", "label"],
"files": [
{
"path": "blocks/login-form.tsx",
"type": "registry:block"
}
],
"cssVars": {
"light": {
"brand": "oklch(0.62 0.18 250)"
},
"dark": {
"brand": "oklch(0.72 0.16 250)"
}
}
}
```
Important fields:
- `name`: the installable item name. It is not necessarily a file path.
- `type`: one of the registry item types, such as `registry:ui`,
`registry:block`, `registry:lib`, `registry:hook`, `registry:file`,
`registry:page`, `registry:theme`, `registry:style`, `registry:font`, or
`registry:item`.
- `files`: source files copied or generated by the item.
- `dependencies`: npm runtime dependencies.
- `devDependencies`: npm development dependencies.
- `registryDependencies`: other registry items required by this item.
- `cssVars`, `css`, `tailwind`, `envVars`, and `docs`: optional install-time
additions.
File rules:
- File paths are relative to the declaring `registry.json`.
- `registry:file` and `registry:page` files require a `target`.
- Do not use remote file URLs in source registry file paths.
- Keep source files copy-pasteable: no hidden app-only imports.
## Registry Dependencies
`registryDependencies` entries are item addresses, not file paths.
```json
{
"name": "login-form",
"type": "registry:block",
"registryDependencies": ["button", "@acme/input", "acme/ui/card#v1.2.0"],
"files": [
{
"path": "blocks/login-form.tsx",
"type": "registry:block"
}
]
}
```
Dependency rules:
- Bare names such as `"button"` mean official shadcn items.
- Bare names never mean same-registry or same-repository items.
- Namespaced dependencies use `@namespace/item-name`.
- GitHub dependencies use `owner/repo/item-name`.
- Pin GitHub dependencies with `owner/repo/item-name#ref` when needed.
- Refs are not inherited. If `owner/repo/foo#v2` depends on `bar` from the same
repo at `v2`, write `owner/repo/bar#v2`.
- Do not use relative dependencies such as `"./bar"`.
## Address Schemes
When reasoning about a registry item string, classify it first.
| Address | Scheme | Meaning |
| ----------------------------------- | --------- | ------------------------------------------------------------ |
| `button` | shadcn | Official shadcn item named `button`. |
| `@acme/button` | namespace | Item `button` from configured registry `@acme`. |
| `@acme/ui/button` | namespace | Item `ui/button` from configured registry `@acme`. |
| `https://example.com/r/button.json` | url | Built registry item JSON at that URL. |
| `./button.json` | file | Built registry item JSON on disk. |
| `acme/ui/button` | github | Item `button` from GitHub repo `acme/ui`. |
| `acme/ui/forms/login#main` | github | Item `forms/login` from GitHub repo `acme/ui` at ref `main`. |
For namespace and GitHub addresses, slashful item names are allowed and are item
names, not file paths. Addresses ending in `.json` keep file-address
precedence, so `acme/ui/data/schema.json` is treated as a file path, not a
GitHub item address.
## GitHub Registries
A public GitHub repository can act as a source registry when it has a root
`registry.json`.
```txt
owner/repo/item-name[#ref]
```
Rules:
- The first two path segments are GitHub owner and repo.
- All remaining path segments are the registry item name.
- The source entrypoint is always root `registry.json`.
- GitHub registries are source registries consumed directly by the CLI. They do
not require `shadcn build` or generated item JSON files.
- `include` follows the same source-registry rules as local registries.
- Currently, GitHub addresses support public `github.com` repositories only.
- Private repos and GitHub Enterprise require explicit product decisions.
When implementing GitHub registry fetching, resolve refs to a commit SHA before
reading source files. Do not read moving refs directly from
`raw.githubusercontent.com`, because branch-like refs can be cached for several
minutes.
Preferred flow:
```txt
owner/repo[#ref]
-> resolve ref with git ls-remote
-> commit SHA
-> read https://raw.githubusercontent.com/{owner}/{repo}/{sha}/registry.json
-> read includes and item files from the same SHA
```
This keeps a command on one consistent repository snapshot.
Full 40-character commit SHAs are already stable and can be used directly.
Branches, tags, and short refs require Git so the CLI can resolve them to a
commit SHA first.
## Build and Verify
Use the CLI to build source registries:
```bash
npx shadcn@latest build
npx shadcn@latest build registry.json --output public/r
```
Use CLI commands to inspect the result:
```bash
npx shadcn@latest list @acme
npx shadcn@latest search @acme -q "login"
npx shadcn@latest view @acme/login-form
npx shadcn@latest add @acme/login-form --dry-run
npx shadcn@latest registry validate ./registry.json
```
Use GitHub addresses directly for public GitHub registries:
```bash
npx shadcn@latest list owner/repo
npx shadcn@latest search owner/repo -q "login"
npx shadcn@latest view owner/repo/item
npx shadcn@latest add owner/repo/item --dry-run
npx shadcn@latest registry validate owner/repo
```
When working on registry implementation in the shadcn/ui codebase:
- Keep address parsing pure and testable.
- Do not add side effects to validators.
- Preserve existing behavior for official shadcn, namespace, URL, and file
schemes.
- Add tests for address parsing, source loading, dependency resolution, list,
search, view, and add paths.
- Prefer small source-reader abstractions over a plugin system until there are
multiple real providers.
@@ -0,0 +1,306 @@
# Base vs Radix
API differences between `base` and `radix`. Check the `base` field from `npx shadcn@latest info`.
## Contents
- Composition: asChild vs render
- Button / trigger as non-button element
- Select (items prop, placeholder, positioning, multiple, object values)
- ToggleGroup (type vs multiple)
- Slider (scalar vs array)
- Accordion (type and defaultValue)
---
## Composition: asChild (radix) vs render (base)
Radix uses `asChild` to replace the default element. Base uses `render`. Don't wrap triggers in extra elements.
**Incorrect:**
```tsx
<DialogTrigger>
<div>
<Button>Open</Button>
</div>
</DialogTrigger>
```
**Correct (radix):**
```tsx
<DialogTrigger asChild>
<Button>Open</Button>
</DialogTrigger>
```
**Correct (base):**
```tsx
<DialogTrigger render={<Button />}>Open</DialogTrigger>
```
This applies to all trigger and close components: `DialogTrigger`, `SheetTrigger`, `AlertDialogTrigger`, `DropdownMenuTrigger`, `PopoverTrigger`, `TooltipTrigger`, `CollapsibleTrigger`, `DialogClose`, `SheetClose`, `NavigationMenuLink`, `BreadcrumbLink`, `SidebarMenuButton`, `Badge`, `Item`.
---
## Button / trigger as non-button element (base only)
When `render` changes an element to a non-button (`<a>`, `<span>`), add `nativeButton={false}`.
**Incorrect (base):** missing `nativeButton={false}`.
```tsx
<Button render={<a href="/docs" />}>Read the docs</Button>
```
**Correct (base):**
```tsx
<Button render={<a href="/docs" />} nativeButton={false}>
Read the docs
</Button>
```
**Correct (radix):**
```tsx
<Button asChild>
<a href="/docs">Read the docs</a>
</Button>
```
Same for triggers whose `render` is not a `Button`:
```tsx
// base.
<PopoverTrigger render={<InputGroupAddon />} nativeButton={false}>
Pick date
</PopoverTrigger>
```
---
## Select
**items prop (base only).** Base requires an `items` prop on the root. Radix uses inline JSX only.
**Incorrect (base):**
```tsx
<Select>
<SelectTrigger><SelectValue placeholder="Select a fruit" /></SelectTrigger>
</Select>
```
**Correct (base):**
```tsx
const items = [
{ label: "Select a fruit", value: null },
{ label: "Apple", value: "apple" },
{ label: "Banana", value: "banana" },
]
<Select items={items}>
<SelectTrigger>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{items.map((item) => (
<SelectItem key={item.value} value={item.value}>{item.label}</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
```
**Correct (radix):**
```tsx
<Select>
<SelectTrigger>
<SelectValue placeholder="Select a fruit" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem value="apple">Apple</SelectItem>
<SelectItem value="banana">Banana</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
```
**Placeholder.** Base uses a `{ value: null }` item in the items array. Radix uses `<SelectValue placeholder="...">`.
**Content positioning.** Base uses `alignItemWithTrigger`. Radix uses `position`.
```tsx
// base.
<SelectContent alignItemWithTrigger={false} side="bottom">
// radix.
<SelectContent position="popper">
```
---
## Select — multiple selection and object values (base only)
Base supports `multiple`, render-function children on `SelectValue`, and object values with `itemToStringValue`. Radix is single-select with string values only.
**Correct (base — multiple selection):**
```tsx
<Select items={items} multiple defaultValue={[]}>
<SelectTrigger>
<SelectValue>
{(value: string[]) => value.length === 0 ? "Select fruits" : `${value.length} selected`}
</SelectValue>
</SelectTrigger>
...
</Select>
```
**Correct (base — object values):**
```tsx
<Select defaultValue={plans[0]} itemToStringValue={(plan) => plan.name}>
<SelectTrigger>
<SelectValue>{(value) => value.name}</SelectValue>
</SelectTrigger>
...
</Select>
```
---
## ToggleGroup
Base uses a `multiple` boolean prop. Radix uses `type="single"` or `type="multiple"`.
**Incorrect (base):**
```tsx
<ToggleGroup type="single" defaultValue="daily">
<ToggleGroupItem value="daily">Daily</ToggleGroupItem>
</ToggleGroup>
```
**Correct (base):**
```tsx
// Single (no prop needed), defaultValue is always an array.
<ToggleGroup defaultValue={["daily"]} spacing={2}>
<ToggleGroupItem value="daily">Daily</ToggleGroupItem>
<ToggleGroupItem value="weekly">Weekly</ToggleGroupItem>
</ToggleGroup>
// Multi-selection.
<ToggleGroup multiple>
<ToggleGroupItem value="bold">Bold</ToggleGroupItem>
<ToggleGroupItem value="italic">Italic</ToggleGroupItem>
</ToggleGroup>
```
**Correct (radix):**
```tsx
// Single, defaultValue is a string.
<ToggleGroup type="single" defaultValue="daily" spacing={2}>
<ToggleGroupItem value="daily">Daily</ToggleGroupItem>
<ToggleGroupItem value="weekly">Weekly</ToggleGroupItem>
</ToggleGroup>
// Multi-selection.
<ToggleGroup type="multiple">
<ToggleGroupItem value="bold">Bold</ToggleGroupItem>
<ToggleGroupItem value="italic">Italic</ToggleGroupItem>
</ToggleGroup>
```
**Controlled single value:**
```tsx
// base — wrap/unwrap arrays.
const [value, setValue] = React.useState("normal")
<ToggleGroup value={[value]} onValueChange={(v) => setValue(v[0])}>
// radix — plain string.
const [value, setValue] = React.useState("normal")
<ToggleGroup type="single" value={value} onValueChange={setValue}>
```
---
## Slider
Base accepts a plain number for a single thumb. Radix always requires an array.
**Incorrect (base):**
```tsx
<Slider defaultValue={[50]} max={100} step={1} />
```
**Correct (base):**
```tsx
<Slider defaultValue={50} max={100} step={1} />
```
**Correct (radix):**
```tsx
<Slider defaultValue={[50]} max={100} step={1} />
```
Both use arrays for range sliders. Controlled `onValueChange` in base may need a cast:
```tsx
// base.
const [value, setValue] = React.useState([0.3, 0.7])
<Slider value={value} onValueChange={(v) => setValue(v as number[])} />
// radix.
const [value, setValue] = React.useState([0.3, 0.7])
<Slider value={value} onValueChange={setValue} />
```
---
## Accordion
Radix requires `type="single"` or `type="multiple"` and supports `collapsible`. `defaultValue` is a string. Base uses no `type` prop, uses `multiple` boolean, and `defaultValue` is always an array.
**Incorrect (base):**
```tsx
<Accordion type="single" collapsible defaultValue="item-1">
<AccordionItem value="item-1">...</AccordionItem>
</Accordion>
```
**Correct (base):**
```tsx
<Accordion defaultValue={["item-1"]}>
<AccordionItem value="item-1">...</AccordionItem>
</Accordion>
// Multi-select.
<Accordion multiple defaultValue={["item-1", "item-2"]}>
<AccordionItem value="item-1">...</AccordionItem>
<AccordionItem value="item-2">...</AccordionItem>
</Accordion>
```
**Correct (radix):**
```tsx
<Accordion type="single" collapsible defaultValue="item-1">
<AccordionItem value="item-1">...</AccordionItem>
</Accordion>
```
+195
View File
@@ -0,0 +1,195 @@
# Component Composition
## Contents
- Items always inside their Group component
- Callouts use Alert
- Empty states use Empty component
- Toast notifications use sonner
- Choosing between overlay components
- Dialog, Sheet, and Drawer always need a Title
- Card structure
- Button has no isPending or isLoading prop
- TabsTrigger must be inside TabsList
- Avatar always needs AvatarFallback
- Use Separator instead of raw hr or border divs
- Use Skeleton for loading placeholders
- Use Badge instead of custom styled spans
---
## Items always inside their Group component
Never render items directly inside the content container.
**Incorrect:**
```tsx
<SelectContent>
<SelectItem value="apple">Apple</SelectItem>
<SelectItem value="banana">Banana</SelectItem>
</SelectContent>
```
**Correct:**
```tsx
<SelectContent>
<SelectGroup>
<SelectItem value="apple">Apple</SelectItem>
<SelectItem value="banana">Banana</SelectItem>
</SelectGroup>
</SelectContent>
```
This applies to all group-based components:
| Item | Group |
|------|-------|
| `SelectItem`, `SelectLabel` | `SelectGroup` |
| `DropdownMenuItem`, `DropdownMenuLabel`, `DropdownMenuSub` | `DropdownMenuGroup` |
| `MenubarItem` | `MenubarGroup` |
| `ContextMenuItem` | `ContextMenuGroup` |
| `CommandItem` | `CommandGroup` |
---
## Callouts use Alert
```tsx
<Alert>
<AlertTitle>Warning</AlertTitle>
<AlertDescription>Something needs attention.</AlertDescription>
</Alert>
```
---
## Empty states use Empty component
```tsx
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon"><FolderIcon /></EmptyMedia>
<EmptyTitle>No projects yet</EmptyTitle>
<EmptyDescription>Get started by creating a new project.</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button>Create Project</Button>
</EmptyContent>
</Empty>
```
---
## Toast notifications use sonner
```tsx
import { toast } from "sonner"
toast.success("Changes saved.")
toast.error("Something went wrong.")
toast("File deleted.", {
action: { label: "Undo", onClick: () => undoDelete() },
})
```
---
## Choosing between overlay components
| Use case | Component |
|----------|-----------|
| Focused task that requires input | `Dialog` |
| Destructive action confirmation | `AlertDialog` |
| Side panel with details or filters | `Sheet` |
| Mobile-first bottom panel | `Drawer` |
| Quick info on hover | `HoverCard` |
| Small contextual content on click | `Popover` |
---
## Dialog, Sheet, and Drawer always need a Title
`DialogTitle`, `SheetTitle`, `DrawerTitle` are required for accessibility. Use `className="sr-only"` if visually hidden.
```tsx
<DialogContent>
<DialogHeader>
<DialogTitle>Edit Profile</DialogTitle>
<DialogDescription>Update your profile.</DialogDescription>
</DialogHeader>
...
</DialogContent>
```
---
## Card structure
Use full composition — don't dump everything into `CardContent`:
```tsx
<Card>
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Manage your team.</CardDescription>
</CardHeader>
<CardContent>...</CardContent>
<CardFooter>
<Button>Invite</Button>
</CardFooter>
</Card>
```
---
## Button has no isPending or isLoading prop
Compose with `Spinner` + `data-icon` + `disabled`:
```tsx
<Button disabled>
<Spinner data-icon="inline-start" />
Saving...
</Button>
```
---
## TabsTrigger must be inside TabsList
Never render `TabsTrigger` directly inside `Tabs` — always wrap in `TabsList`:
```tsx
<Tabs defaultValue="account">
<TabsList>
<TabsTrigger value="account">Account</TabsTrigger>
<TabsTrigger value="password">Password</TabsTrigger>
</TabsList>
<TabsContent value="account">...</TabsContent>
</Tabs>
```
---
## Avatar always needs AvatarFallback
Always include `AvatarFallback` for when the image fails to load:
```tsx
<Avatar>
<AvatarImage src="/avatar.png" alt="User" />
<AvatarFallback>JD</AvatarFallback>
</Avatar>
```
---
## Use existing components instead of custom markup
| Instead of | Use |
|---|---|
| `<hr>` or `<div className="border-t">` | `<Separator />` |
| `<div className="animate-pulse">` with styled divs | `<Skeleton className="h-4 w-3/4" />` |
| `<span className="rounded-full bg-green-100 ...">` | `<Badge variant="secondary">` |
+192
View File
@@ -0,0 +1,192 @@
# Forms & Inputs
## Contents
- Forms use FieldGroup + Field
- InputGroup requires InputGroupInput/InputGroupTextarea
- Buttons inside inputs use InputGroup + InputGroupAddon
- Option sets (27 choices) use ToggleGroup
- FieldSet + FieldLegend for grouping related fields
- Field validation and disabled states
---
## Forms use FieldGroup + Field
Always use `FieldGroup` + `Field` — never raw `div` with `space-y-*`:
```tsx
<FieldGroup>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input id="email" type="email" />
</Field>
<Field>
<FieldLabel htmlFor="password">Password</FieldLabel>
<Input id="password" type="password" />
</Field>
</FieldGroup>
```
Use `Field orientation="horizontal"` for settings pages. Use `FieldLabel className="sr-only"` for visually hidden labels.
**Choosing form controls:**
- Simple text input → `Input`
- Dropdown with predefined options → `Select`
- Searchable dropdown → `Combobox`
- Native HTML select (no JS) → `native-select`
- Boolean toggle → `Switch` (for settings) or `Checkbox` (for forms)
- Single choice from few options → `RadioGroup`
- Toggle between 25 options → `ToggleGroup` + `ToggleGroupItem`
- OTP/verification code → `InputOTP`
- Multi-line text → `Textarea`
---
## InputGroup requires InputGroupInput/InputGroupTextarea
Never use raw `Input` or `Textarea` inside an `InputGroup`.
**Incorrect:**
```tsx
<InputGroup>
<Input placeholder="Search..." />
</InputGroup>
```
**Correct:**
```tsx
import { InputGroup, InputGroupInput } from "@/components/ui/input-group"
<InputGroup>
<InputGroupInput placeholder="Search..." />
</InputGroup>
```
---
## Buttons inside inputs use InputGroup + InputGroupAddon
Never place a `Button` directly inside or adjacent to an `Input` with custom positioning.
**Incorrect:**
```tsx
<div className="relative">
<Input placeholder="Search..." className="pr-10" />
<Button className="absolute right-0 top-0" size="icon">
<SearchIcon />
</Button>
</div>
```
**Correct:**
```tsx
import { InputGroup, InputGroupInput, InputGroupAddon } from "@/components/ui/input-group"
<InputGroup>
<InputGroupInput placeholder="Search..." />
<InputGroupAddon>
<Button size="icon">
<SearchIcon data-icon="inline-start" />
</Button>
</InputGroupAddon>
</InputGroup>
```
---
## Option sets (27 choices) use ToggleGroup
Don't manually loop `Button` components with active state.
**Incorrect:**
```tsx
const [selected, setSelected] = useState("daily")
<div className="flex gap-2">
{["daily", "weekly", "monthly"].map((option) => (
<Button
key={option}
variant={selected === option ? "default" : "outline"}
onClick={() => setSelected(option)}
>
{option}
</Button>
))}
</div>
```
**Correct:**
```tsx
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"
<ToggleGroup spacing={2}>
<ToggleGroupItem value="daily">Daily</ToggleGroupItem>
<ToggleGroupItem value="weekly">Weekly</ToggleGroupItem>
<ToggleGroupItem value="monthly">Monthly</ToggleGroupItem>
</ToggleGroup>
```
Combine with `Field` for labelled toggle groups:
```tsx
<Field orientation="horizontal">
<FieldTitle id="theme-label">Theme</FieldTitle>
<ToggleGroup aria-labelledby="theme-label" spacing={2}>
<ToggleGroupItem value="light">Light</ToggleGroupItem>
<ToggleGroupItem value="dark">Dark</ToggleGroupItem>
<ToggleGroupItem value="system">System</ToggleGroupItem>
</ToggleGroup>
</Field>
```
> **Note:** `defaultValue` and `type`/`multiple` props differ between base and radix. See [base-vs-radix.md](./base-vs-radix.md#togglegroup).
---
## FieldSet + FieldLegend for grouping related fields
Use `FieldSet` + `FieldLegend` for related checkboxes, radios, or switches — not `div` with a heading:
```tsx
<FieldSet>
<FieldLegend variant="label">Preferences</FieldLegend>
<FieldDescription>Select all that apply.</FieldDescription>
<FieldGroup className="gap-3">
<Field orientation="horizontal">
<Checkbox id="dark" />
<FieldLabel htmlFor="dark" className="font-normal">Dark mode</FieldLabel>
</Field>
</FieldGroup>
</FieldSet>
```
---
## Field validation and disabled states
Both attributes are needed — `data-invalid`/`data-disabled` styles the field (label, description), while `aria-invalid`/`disabled` styles the control.
```tsx
// Invalid.
<Field data-invalid>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input id="email" aria-invalid />
<FieldDescription>Invalid email address.</FieldDescription>
</Field>
// Disabled.
<Field data-disabled>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input id="email" disabled />
</Field>
```
Works for all controls: `Input`, `Textarea`, `Select`, `Checkbox`, `RadioGroupItem`, `Switch`, `Slider`, `NativeSelect`, `InputOTP`.
+101
View File
@@ -0,0 +1,101 @@
# Icons
**Always use the project's configured `iconLibrary` for imports.** Check the `iconLibrary` field from project context: `lucide``lucide-react`, `tabler``@tabler/icons-react`, etc. Never assume `lucide-react`.
---
## Icons in Button use data-icon attribute
Add `data-icon="inline-start"` (prefix) or `data-icon="inline-end"` (suffix) to the icon. No sizing classes on the icon.
**Incorrect:**
```tsx
<Button>
<SearchIcon className="mr-2 size-4" />
Search
</Button>
```
**Correct:**
```tsx
<Button>
<SearchIcon data-icon="inline-start"/>
Search
</Button>
<Button>
Next
<ArrowRightIcon data-icon="inline-end"/>
</Button>
```
---
## No sizing classes on icons inside components
Components handle icon sizing via CSS. Don't add `size-4`, `w-4 h-4`, or other sizing classes to icons inside `Button`, `DropdownMenuItem`, `Alert`, `Sidebar*`, or other shadcn components. Unless the user explicitly asks for custom icon sizes.
**Incorrect:**
```tsx
<Button>
<SearchIcon className="size-4" data-icon="inline-start" />
Search
</Button>
<DropdownMenuItem>
<SettingsIcon className="mr-2 size-4" />
Settings
</DropdownMenuItem>
```
**Correct:**
```tsx
<Button>
<SearchIcon data-icon="inline-start" />
Search
</Button>
<DropdownMenuItem>
<SettingsIcon />
Settings
</DropdownMenuItem>
```
---
## Pass icons as component objects, not string keys
Use `icon={CheckIcon}`, not a string key to a lookup map.
**Incorrect:**
```tsx
const iconMap = {
check: CheckIcon,
alert: AlertIcon,
}
function StatusBadge({ icon }: { icon: string }) {
const Icon = iconMap[icon]
return <Icon />
}
<StatusBadge icon="check" />
```
**Correct:**
```tsx
// Import from the project's configured iconLibrary (e.g. lucide-react, @tabler/icons-react).
import { CheckIcon } from "lucide-react"
function StatusBadge({ icon: Icon }: { icon: React.ComponentType }) {
return <Icon />
}
<StatusBadge icon={CheckIcon} />
```
+162
View File
@@ -0,0 +1,162 @@
# Styling & Customization
See [customization.md](../customization.md) for theming, CSS variables, and adding custom colors.
## Contents
- Semantic colors
- Built-in variants first
- className for layout only
- No space-x-* / space-y-*
- Prefer size-* over w-* h-* when equal
- Prefer truncate shorthand
- No manual dark: color overrides
- Use cn() for conditional classes
- No manual z-index on overlay components
---
## Semantic colors
**Incorrect:**
```tsx
<div className="bg-blue-500 text-white">
<p className="text-gray-600">Secondary text</p>
</div>
```
**Correct:**
```tsx
<div className="bg-primary text-primary-foreground">
<p className="text-muted-foreground">Secondary text</p>
</div>
```
---
## No raw color values for status/state indicators
For positive, negative, or status indicators, use Badge variants, semantic tokens like `text-destructive`, or define custom CSS variables — don't reach for raw Tailwind colors.
**Incorrect:**
```tsx
<span className="text-emerald-600">+20.1%</span>
<span className="text-green-500">Active</span>
<span className="text-red-600">-3.2%</span>
```
**Correct:**
```tsx
<Badge variant="secondary">+20.1%</Badge>
<Badge>Active</Badge>
<span className="text-destructive">-3.2%</span>
```
If you need a success/positive color that doesn't exist as a semantic token, use a Badge variant or ask the user about adding a custom CSS variable to the theme (see [customization.md](../customization.md)).
---
## Built-in variants first
**Incorrect:**
```tsx
<Button className="border border-input bg-transparent hover:bg-accent">
Click me
</Button>
```
**Correct:**
```tsx
<Button variant="outline">Click me</Button>
```
---
## className for layout only
Use `className` for layout (e.g. `max-w-md`, `mx-auto`, `mt-4`), **not** for overriding component colors or typography. To change colors, use semantic tokens, built-in variants, or CSS variables.
**Incorrect:**
```tsx
<Card className="bg-blue-100 text-blue-900 font-bold">
<CardContent>Dashboard</CardContent>
</Card>
```
**Correct:**
```tsx
<Card className="max-w-md mx-auto">
<CardContent>Dashboard</CardContent>
</Card>
```
To customize a component's appearance, prefer these approaches in order:
1. **Built-in variants**`variant="outline"`, `variant="destructive"`, etc.
2. **Semantic color tokens**`bg-primary`, `text-muted-foreground`.
3. **CSS variables** — define custom colors in the global CSS file (see [customization.md](../customization.md)).
---
## No space-x-* / space-y-*
Use `gap-*` instead. `space-y-4``flex flex-col gap-4`. `space-x-2``flex gap-2`.
```tsx
<div className="flex flex-col gap-4">
<Input />
<Input />
<Button>Submit</Button>
</div>
```
---
## Prefer size-* over w-* h-* when equal
`size-10` not `w-10 h-10`. Applies to icons, avatars, skeletons, etc.
---
## Prefer truncate shorthand
`truncate` not `overflow-hidden text-ellipsis whitespace-nowrap`.
---
## No manual dark: color overrides
Use semantic tokens — they handle light/dark via CSS variables. `bg-background text-foreground` not `bg-white dark:bg-gray-950`.
---
## Use cn() for conditional classes
Use the `cn()` utility from the project for conditional or merged class names. Don't write manual ternaries in className strings.
**Incorrect:**
```tsx
<div className={`flex items-center ${isActive ? "bg-primary text-primary-foreground" : "bg-muted"}`}>
```
**Correct:**
```tsx
import { cn } from "@/lib/utils"
<div className={cn("flex items-center", isActive ? "bg-primary text-primary-foreground" : "bg-muted")}>
```
---
## No manual z-index on overlay components
`Dialog`, `Sheet`, `Drawer`, `AlertDialog`, `DropdownMenu`, `Popover`, `Tooltip`, `HoverCard` handle their own stacking. Never add `z-50` or `z-[999]`.
+16
View File
@@ -0,0 +1,16 @@
# CodeGraph data files
# These are local to each machine and should not be committed
# Database
*.db
*.db-wal
*.db-shm
# Cache
cache/
# Logs
*.log
# Hook markers
.dirty
+338
View File
@@ -0,0 +1,338 @@
## Language
Always respond in Chinese (中文). Use the user's language for all conversations and explanations. Code, commands, and technical terms can remain in English.
页面内容(UI 文案、标签、提示、错误信息)默认使用 **英语**。仅当用户明确要求时才做多语言。
# Project Guidelines — appwebks
## Tech Stack
- **Runtime**: Bun (packageManager, scripts, lockfile)
- **Framework**: React 19, TypeScript 6.0, Vite 8.0
- **Styling**: Tailwind CSS 4.3 + clsx + tailwind-mergeCVA 变体模式)
- **State**: @tanstack/react-query v5(服务端状态)+ URL search/path params(客户端状态)
- **Routing**: react-router-dom v7
- **HTTP**: ky(优先)+ axios
- **Validation**: zod v4
- **Icons**: lucide-react
## Project Structure
```
src/
pages/ # 页面组件,每个 page 一个文件夹
components/ # 共享组件,按功能域分文件夹
hooks/ # 自定义 hooks(含 react-query hooks
client/ # 自动生成 API 代码(只读!)
lib/ # 工具函数、常量
types/ # 共享类型定义
```
## Routing
使用 React Router v7 **Data Mode**`createBrowserRouter` + Route Object 配置。
- 路由配置集中在 `src/routes.ts`,通过 `createBrowserRouter` 组装
- 每个路由模块(Component + loader + action)为独立文件,放在 `src/pages/`
- 路由文件不容纳 JSX,只 export RouteObject[]
```ts
// src/routes.ts — 路由配置,只组装不渲染
import { createBrowserRouter } from 'react-router';
import { RepoListPage } from '@/pages/RepoList/RepoListPage';
import { RepoDetailPage } from '@/pages/RepoDetail/RepoDetailPage';
import { RootLayout } from '@/pages/RootLayout';
export const router = createBrowserRouter([
{
path: '/',
Component: RootLayout,
children: [
{ index: true, Component: RepoListPage },
{ path: 'repo/:id', Component: RepoDetailPage },
],
},
]);
```
```tsx
// src/pages/RepoList/RepoListPage.tsx — 路由模块
export function RepoListPage() {
const { data } = useRepoList();
return <div>...</div>;
}
```
## Code Style
### File Naming
- React 组件文件:**PascalCase**`Button.tsx``UserList.tsx`
- Hooks / utils / types 文件:**camelCase**`useAuth.ts``formatDate.ts`
- 页面文件夹:**PascalCase**`UserProfile/``RepoList/`
### Component Conventions
- 组件用 **function 声明**,不用 arrow function
- Props 类型用 **interface**,写在组件文件顶部,不单独导出:
```tsx
interface ButtonProps {
size?: 'sm' | 'md' | 'lg';
variant?: 'primary' | 'secondary';
children: React.ReactNode;
}
export function Button({ size = 'md', variant = 'primary', children }: ButtonProps) {
// ...
}
```
- 原生 HTML 元素 Props 用 `React.ComponentProps<'button'>` 派生
- 单文件不超过 **200 行**,函数不超过 **50 行**
- 复杂逻辑抽成 hooks
### Import Order
Biome 的 `organizeImports` 会自动按以下顺序排列 import,组间空行分隔:
1. React / React Router / react-query 等核心库
2. 第三方 UI / 工具库(lucide-react、clsx、zod...
3. `@/` 别名导入
4. 相对路径导入(`./`、`../`
```tsx
import { useState } from 'react';
import { useQuery } from '@tanstack/react-query';
import { Link } from 'react-router-dom';
import { Search, Plus } from 'lucide-react';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { repoService } from '@/client/services/RepoService';
import { Button } from '@/components/ui/Button';
import { useRepoList } from './useRepoList';
```
## Styling
### Tailwind + CVA
用 `clsx` + `tailwind-merge` 管理组件变体,按 CVA 模式组织:
```tsx
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
function cn(...inputs: (string | undefined | false | null)[]) {
return twMerge(clsx(inputs));
}
const variants = {
size: {
sm: 'px-2 py-1 text-sm',
md: 'px-4 py-2 text-base',
lg: 'px-6 py-3 text-lg',
},
variant: {
primary: 'bg-blue-600 text-white hover:bg-blue-700',
secondary: 'bg-gray-200 text-gray-900 hover:bg-gray-300',
},
} as const;
interface ButtonProps {
size?: keyof typeof variants.size;
variant?: keyof typeof variants.variant;
}
export function Button({ size = 'md', variant = 'primary', ... }: ButtonProps) {
return <button className={cn(variants.size[size], variants.variant[variant])} ... />;
}
```
- **禁止新增任何 `.css` 文件**。项目只保留一个全局入口 CSS(`src/index.css`),仅用于:
- `@import "tailwindcss"`
- CSS 自定义属性(主题变量)
- 全局 reset
- 组件样式**必须**使用 Tailwind 原子类,不得引用局部 CSS 文件
- 禁止 `@apply` 抽取类名
- `cn()` 函数放在 `@/lib/cn.ts` 中统一导入
## State Management
### URL-Driven State
- UI 状态(分页、筛选、排序、tab 切换)**必须**编码到 URL search/path params
- 用 `useSearchParams()` 读写,组件内部 `useState` 最小化
- 好处:可分享、可书签、浏览器前进后退自然工作
### Server State (react-query)
- 所有 API 调用必须通过 react-query hooks`useQuery` / `useMutation`
- 禁止在组件中直接调用 `src/client/` 的服务方法
- Query key 约定:`['domain', 'action', ...params]`,如 `['repos', 'list', { page, q }]`
**注意**TanStack Query v5 已移除 `useQuery` 上的 `onError` / `onSuccess` / `onSettled` 回调:
- `useQuery` 错误处理:组件内检查 `error` 状态,或全局通过 `QueryClient.setDefaultOptions` 配置
- `useMutation` 错误处理:`onError` 回调仍然可用
```tsx
// useQuery — 错误在 error 字段上处理
import { useQuery } from '@tanstack/react-query';
const { data, error, isLoading } = useQuery({
queryKey: ['repos', 'list', { page }],
queryFn: () => repoService.listRepos({ page }),
});
// useMutation — onError 仍然可用
import { useMutation } from '@tanstack/react-query';
import { toast } from 'sonner';
const mutation = useMutation({
mutationFn: (params) => repoService.createRepo(params),
onError: (error) => toast.error(error.message),
});
```
## API Layer
### Generated Codesrc/client/
- **视为只读**,禁止手动修改任何 `src/client/` 下的文件
- 需要变更时修改 `openapi.json` 或 `genapi.js`,然后运行 `bun run genapi` 重新生成
### Custom Hooks 封装
每个业务域在 `src/hooks/` 下创建对应的 react-query hook 文件:
```
src/hooks/
useRepoList.ts # useQuery: repo list + filters
useRepoDetail.ts # useQuery: single repo
useCreateRepo.ts # useMutation: create repo
useBranchList.ts # useQuery: branch list
```
hook 职责:
- 组装 queryKey(如 `['repos', 'list', { page, q }]`
- 调用 `src/client/` 服务方法
- 转换入参(筛选条件 → API 参数)、归一化错误
- **默认返回 React Query 原始结果**:不隐藏 `isPending` / `isFetching` / `error` / `refetch` 等状态
```tsx
// src/hooks/useRepoList.ts — 典型范式
import { useQuery, keepPreviousData } from '@tanstack/react-query';
import { repoService } from '@/client/services/RepoService';
export function useRepoList(filters: RepoFilters) {
return useQuery({
queryKey: ['repos', 'list', filters],
queryFn: ({ signal }) => repoService.listRepos({ ...filters }, { signal }),
placeholderData: keepPreviousData,
});
}
// 组件侧直接解构:const { data, isPending, isFetching, error, refetch } = useRepoList(filters);
```
### Error Handling
- 全局 **ErrorBoundary** 捕获 React 渲染错误
- `useMutation` 的 API 错误通过 `onError` 回调统一分发 toast
- `useQuery` 的 API 错误通过组件内判断 `error` 状态处理,或使用全局 `throwOnError` + ErrorBoundary
- 禁止在组件中 try/catch API 调用后自己做 UI 错误展示
```tsx
// 全局 QueryClient 配置(在 App 入口)
import { QueryClient } from '@tanstack/react-query';
import { toast } from 'sonner';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
throwOnError: true, // Query 抛错 → ErrorBoundary 捕获
},
mutations: {
onError: (error) => toast.error(error.message),
},
},
});
```
## Git
### Branching
- **Trunk-based**:直接在 `main` 上做小而频繁的提交
- 不做长期 feature 分支,未完成功能用 feature flag 或路由守卫控制
- 需要时可以从 main 拉短期分支,但合入后立即删除
### Commits
- **Conventional Commits**`feat` / `fix` / `refactor` / `docs` / `test` / `chore`
- 原子提交:一个 commit 只做一件事
- 禁止 force push 到 main
## FormatterBiome
项目使用 **Biome** 作为唯一的格式化 & lint 工具。配置见 `biome.json`。
### 格式化规则
| 配置项 | 值 |
|--------|-----|
| 缩进 | 2 空格 |
| 引号 | 单引号(JS/TS),双引号(JSX) |
| 分号 | 总是 |
| 尾逗号 | 总是 |
| 行宽 | 100 |
| 换行符 | LF |
| 箭头函数括号 | 总是保留 |
### 命令
```bash
bun run format # 格式化 src/ 下所有文件
bun run lint # 仅 lint 检查,不修改
bun run check # 格式化 + lint,写入修复
```
### Lint 规则
- 启用 **recommended** 规则集
- `noUnusedVariables`: error — 禁止未使用变量
- `useHookAtTopLevel`: error — React hooks 必须在顶层调用
- `noParameterAssign`: error — 禁止给参数重新赋值
- `useConst`: error — 能用 const 就别用 let
- `useTemplate`: warn — 字符串拼接改用模板字符串
## Quality Gate
AI 助手完成代码修改后,**必须依次运行以下命令**确保通过:
```bash
bun run check # Biome 格式化 + lint
bun run build # TypeScript 类型检查 + Vite 构建
```
任一步骤失败不允许提交。
## Testing
当前阶段 **不强制写测试**,快速迭代优先。后续需要时优先补关键路径的单元测试(vitest)。
## Environment Variables
- **禁止**在业务代码中直接读取 `import.meta.env.*`
- 所有环境变量必须通过 `@/lib/env` 集中访问,统一提供默认值与类型安全
```ts
// src/lib/env.ts
export const env = {
API_BASE_URL: import.meta.env.VITE_API_BASE_URL ?? '/api',
DEV: import.meta.env.DEV,
MODE: import.meta.env.MODE,
} as const;
```
## Import Discipline
- **禁止**页面组件直接导入 `@/client/**`
- 只有 `src/hooks/**` 或 `src/features/**/api/**` 可以导入 generated client
- 页面通过自定义 hook 访问 API 数据,不接触底层 client
```
✅ src/hooks/useRepoList.ts → import { RepoService } from '@/client/services/RepoService'
✅ src/features/repos/api.ts → import { RepoService } from '@/client/services/RepoService'
❌ src/pages/RepoList.tsx → import { RepoService } from '@/client/services/RepoService'
```
## Safety
- 禁止硬编码 secrets / API keys / tokens
- 所有用户输入必须验证(zod schema)
- 错误必须显式处理,禁止 silent failure
- 禁止使用 `// ── xxxx ──────────` 分隔注释
## Reference
- `hooks.txt` — 项目已安装依赖的完整 Hooks 清单
- `biome.json` — Biome 格式化 / Lint 配置
- `openapi.json` — API Schema(用于生成 `src/client/`
- `genapi.js` — API 代码生成脚本(`bun run genapi`
-28
View File
@@ -1,28 +0,0 @@
## Usage
```bash
$ npm install # or pnpm install or yarn install
```
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
## Available Scripts
In the project directory, you can run:
### `npm run dev`
Runs the app in the development mode.<br>
Open [http://localhost:5173](http://localhost:5173) to view it in the browser.
### `npm run build`
Builds the app for production to the `dist` folder.<br>
It correctly bundles Solid in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
## Deployment
Learn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html)
+68
View File
@@ -0,0 +1,68 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
"vcs": {
"clientKind": "git",
"enabled": true,
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"includes": ["src/**", "*.ts", "*.tsx", "*.json", "!src/client", "!openapi.json"],
"maxSize": 2048576
},
"formatter": {
"enabled": true,
"includes": ["src/**", "!src/client/**"],
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100,
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"semicolons": "always",
"trailingCommas": "all",
"bracketSpacing": true,
"arrowParentheses": "always",
"quoteProperties": "asNeeded"
}
},
"css": {
"parser": {
"tailwindDirectives": true
}
},
"json": {
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "error",
"useHookAtTopLevel": "error"
},
"style": {
"noParameterAssign": "error",
"useConst": "error",
"useTemplate": "warn",
"useShorthandAssign": "error"
}
}
},
"assist": {
"enabled": true,
"includes": ["src/**", "!src/client/**"],
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
+823 -58
View File
File diff suppressed because it is too large Load Diff
+25
View File
@@ -0,0 +1,25 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "radix-nova",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"rtl": false,
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"menuColor": "default",
"menuAccent": "subtle",
"registries": {}
}
+218
View File
@@ -0,0 +1,218 @@
# hooks.txt
# react
useState 组件状态
useEffect 副作用
useContext 上下文读取
useReducer 复杂状态管理
useCallback 缓存函数引用
useMemo 缓存计算值
useRef 可变引用 / DOM 引用
useImperativeHandle 自定义 ref 暴露值
useLayoutEffect 同步副作用
useInsertionEffect CSS-in-JS 注入
useId 唯一 ID 生成
useDebugValue DevTools 标签
useDeferredValue 延迟更新
useTransition 过渡状态
useSyncExternalStore 外部 store 订阅
useOptimistic 乐观更新
useActionState Action 状态
use 读取 Promise / Context
# react-dom
useFormStatus 表单提交状态
# react-router-dom
useNavigate 编程式导航
useParams 路由参数
useSearchParams URL query 读写
useLoaderData loader 数据
useActionData action 返回值
useMatches 当前匹配路由链
useFetcher 非导航数据交互
useFetchers 所有活跃 Fetcher
useLocation 当前 location
useNavigation 导航状态
useNavigationType 导航类型
useSubmit 表单提交
useRouteError 路由错误
useOutlet 渲染子路由
useOutletContext Outlet 上下文
useBlocker 导航拦截
useBeforeUnload 页面卸载拦截
useLinkClickHandler 自定义链接点击
useHref 解析完整 href
useInRouterContext 是否在 Router 上下文
useResolvedPath 解析相对路径
useRevalidator 重新验证 loader
useRouteLoaderData 指定路由 loader 数据
useViewTransitionState View Transition 状态
useFormAction 表单 action URL
# @tanstack/react-query
useQuery 数据获取
useMutation 数据修改
useInfiniteQuery 无限滚动分页
useQueries 并行多个 Query
useSuspenseQuery Suspense 模式 Query
useSuspenseInfiniteQuery Suspense 模式 InfiniteQuery
useSuspenseQueries Suspense 模式并行 Queries
useQueryClient 获取 QueryClient 实例
useIsFetching 是否有 Query 正在 fetch
useIsMutating 是否有 Mutation 正在执行
useQueryErrorResetBoundary 重置 ErrorBoundary
# @tanstack/react-form
useForm 表单实例
# @tanstack/react-table
useReactTable 表格实例
# react-hook-form
useForm 表单注册、校验、提交
useController 连接自定义受控组件
useWatch 监听字段值变化
useFormContext 获取 FormProvider 上下文
useFormState 表单整体状态
useFieldArray 动态数组字段
# ahooks - State
useBoolean 布尔值状态
useToggle 两值切换
useSetState 对象状态合并
useMap Map 类型状态
useSet Set 类型状态
usePrevious 获取上一次值
useRafState rAF 节流状态
useSafeState 防卸载后 setState
useGetState 同步获取最新 state
useResetState 可重置 state
useHistoryTravel 状态历史撤销/重做
useCounter 计数器
useSelections 多选管理
useDynamicList 动态列表增删
# ahooks - Effect
useAsyncEffect 异步 Effect
useDebounceEffect 防抖 Effect
useThrottleEffect 节流 Effect
useDebounceFn 防抖函数
useThrottleFn 节流函数
useDeepCompareEffect 深比较 Effect
useUpdateEffect 跳过首次渲染 Effect
useUpdateLayoutEffect 跳过首次 LayoutEffect
useInterval setInterval
useTimeout setTimeout
useRafInterval rAF setInterval
useRafTimeout rAF setTimeout
useLockFn 防并发异步函数
# ahooks - DOM
useTitle document.title
useFavicon favicon
useEventListener 事件监听
useClickAway 点击外部区域
useDocumentVisibility 页面可见性
useDrop / useDrag 拖拽
useEventTarget 事件目标值
useExternal 动态加载外部资源
useFocusWithin 焦点在区域内
useFullscreen 全屏
useHover 鼠标悬停
useInViewport 元素在视口内
useInfiniteScroll 无限滚动
useKeyPress 键盘按键
useLongPress 长按
useMouse 鼠标位置
useMutationObserver DOM 变动监听
useResponsive 响应式断点
useScroll 滚动位置
useSize 元素尺寸
useTextSelection 文本选中
useVirtualList 虚拟滚动
# ahooks - Lifecycle
useMount 组件挂载
useUnmount 组件卸载
useUnmountedRef 获取卸载状态 ref
# ahooks - Advanced
useMemoizedFn 持久化函数引用(引用不变)
useLatest 获取最新值 ref
useRendersCount 渲染次数
useWhyDidYouUpdate 排查不必要 re-render
useEventEmitter 组件间事件通信
useCreation useMemo / useRef 替代
# ahooks - Async
useRequest 异步请求管理(loading / error / pagination / cache
usePagination 分页请求
# ahooks - Browser
useCookieState Cookie 状态
useLocalStorageState localStorage 状态
useSessionStorageState sessionStorage 状态
# next-themes
useTheme 读取 / 切换主题
# embla-carousel-react
useEmblaCarousel 轮播初始化
# react-resizable-panels
usePanelRef Panel 命令式控制
usePanelCallbackRef Panel 回调 ref
useGroupRef Group 命令式控制
useGroupCallbackRef Group 回调 ref
useDefaultLayout 持久化布局
# sonner
useSonner 获取活跃 toast 列表
# cmdk
useCommandState 订阅 Command 状态
# react-day-picker
useDayPicker 日历配置
useDayRender 日期渲染
# @base-ui/react
useButton 按钮状态
useCheckbox 复选框状态
useDialog 对话框状态
useField 表单字段状态
useFieldset 字段组状态
useForm 表单状态
useInput 输入框状态
useMenu 菜单状态
useNumberField 数字输入状态
usePopover 弹出层状态
usePreviewCard 预览卡片状态
useProgress 进度条状态
useRadioGroup 单选组状态
useScrollArea 滚动区域状态
useSelect 选择器状态
useSeparator 分隔符状态
useSlider 滑块状态
useSwitch 开关状态
useTabs 标签页状态
useToggle 切换状态
useTooltip 提示框状态
# radix-ui
useAccordionContext 手风琴上下文
useCheckbox 复选框状态
useCollapsibleContext 折叠面板上下文
useDialogContext 对话框上下文
useDropdownMenuContext 下拉菜单上下文
usePopoverContext 弹出层上下文
useRadioGroup 单选组状态
useSelectContext 选择器上下文
useSlider 滑块状态
useSwitch 开关状态
useTabsContext 标签页上下文
useToggle 切换状态
useTooltipContext 提示框上下文
useScrollArea 滚动区域状态
(每个 primitive 均有对应 state hook,共 30+
+2 -2
View File
@@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/png" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>appwebks</title>
<title>GitDataAi</title>
</head>
<body>
<div id="root"></div>
+160
View File
@@ -0,0 +1,160 @@
# shadcn/ui
> shadcn/ui is a collection of beautifully-designed, accessible components and a code distribution platform. It is built with TypeScript, Tailwind CSS, and Radix UI primitives. It supports multiple frameworks including Next.js, Vite, Remix, Astro, and more. Open Source. Open Code. AI-Ready. It also comes with a command-line tool to install and manage components and a registry system to publish and distribute code.
## Overview
- [Introduction](https://ui.shadcn.com/docs): Core principles—Open Code, Composition, Distribution, Beautiful Defaults, and AI-Ready design.
- [CLI](https://ui.shadcn.com/docs/cli): Command-line tool for installing and managing components.
- [components.json](https://ui.shadcn.com/docs/components-json): Configuration file for customizing the CLI and component installation.
- [Theming](https://ui.shadcn.com/docs/theming): Guide to customizing colors, typography, and design tokens.
- [Changelog](https://ui.shadcn.com/docs/changelog): Release notes and version history.
- [Skills](https://ui.shadcn.com/docs/skills): Deep shadcn/ui knowledge for AI assistants like Claude Code.
- [Directory](https://ui.shadcn.com/docs/directory): Community registries built into the CLI.
## Installation
- [Next.js](https://ui.shadcn.com/docs/installation/next): Install shadcn/ui in a Next.js project.
- [Vite](https://ui.shadcn.com/docs/installation/vite): Install shadcn/ui in a Vite project.
- [Remix](https://ui.shadcn.com/docs/installation/remix): Install shadcn/ui in a Remix project.
- [Astro](https://ui.shadcn.com/docs/installation/astro): Install shadcn/ui in an Astro project.
- [Laravel](https://ui.shadcn.com/docs/installation/laravel): Install shadcn/ui in a Laravel project.
- [Gatsby](https://ui.shadcn.com/docs/installation/gatsby): Install shadcn/ui in a Gatsby project.
- [React Router](https://ui.shadcn.com/docs/installation/react-router): Install shadcn/ui in a React Router project.
- [TanStack Router](https://ui.shadcn.com/docs/installation/tanstack-router): Install shadcn/ui in a TanStack Router project.
- [TanStack Start](https://ui.shadcn.com/docs/installation/tanstack): Install shadcn/ui in a TanStack Start project.
- [Manual Installation](https://ui.shadcn.com/docs/installation/manual): Manually install shadcn/ui without the CLI.
## Components
### Form & Input
- [Field](https://ui.shadcn.com/docs/components/field): Field component for form inputs with labels and error messages.
- [Button](https://ui.shadcn.com/docs/components/button): Button component with multiple variants.
- [Button Group](https://ui.shadcn.com/docs/components/button-group): Group multiple buttons together.
- [Input](https://ui.shadcn.com/docs/components/input): Text input component.
- [Input Group](https://ui.shadcn.com/docs/components/input-group): Input component with prefix and suffix addons.
- [Input OTP](https://ui.shadcn.com/docs/components/input-otp): One-time password input component.
- [Textarea](https://ui.shadcn.com/docs/components/textarea): Multi-line text input component.
- [Checkbox](https://ui.shadcn.com/docs/components/checkbox): Checkbox input component.
- [Radio Group](https://ui.shadcn.com/docs/components/radio-group): Radio button group component.
- [Select](https://ui.shadcn.com/docs/components/select): Select dropdown component.
- [Native Select](https://ui.shadcn.com/docs/components/native-select): Styled native HTML select element.
- [Switch](https://ui.shadcn.com/docs/components/switch): Toggle switch component.
- [Slider](https://ui.shadcn.com/docs/components/slider): Slider input component.
- [Calendar](https://ui.shadcn.com/docs/components/calendar): Calendar component for date selection.
- [Date Picker](https://ui.shadcn.com/docs/components/date-picker): Date picker component combining input and calendar.
- [Combobox](https://ui.shadcn.com/docs/components/combobox): Searchable select component with autocomplete.
- [Label](https://ui.shadcn.com/docs/components/label): Form label component.
### Layout & Navigation
- [Accordion](https://ui.shadcn.com/docs/components/accordion): Collapsible accordion component.
- [Breadcrumb](https://ui.shadcn.com/docs/components/breadcrumb): Breadcrumb navigation component.
- [Navigation Menu](https://ui.shadcn.com/docs/components/navigation-menu): Accessible navigation menu with dropdowns.
- [Sidebar](https://ui.shadcn.com/docs/components/sidebar): Collapsible sidebar component for app layouts.
- [Tabs](https://ui.shadcn.com/docs/components/tabs): Tabbed interface component.
- [Separator](https://ui.shadcn.com/docs/components/separator): Visual divider between content sections.
- [Scroll Area](https://ui.shadcn.com/docs/components/scroll-area): Custom scrollable area with styled scrollbars.
- [Resizable](https://ui.shadcn.com/docs/components/resizable): Resizable panel layout component.
### Overlays & Dialogs
- [Dialog](https://ui.shadcn.com/docs/components/dialog): Modal dialog component.
- [Alert Dialog](https://ui.shadcn.com/docs/components/alert-dialog): Alert dialog for confirmation prompts.
- [Sheet](https://ui.shadcn.com/docs/components/sheet): Slide-out panel component (drawer).
- [Drawer](https://ui.shadcn.com/docs/components/drawer): Mobile-friendly drawer component using Vaul.
- [Popover](https://ui.shadcn.com/docs/components/popover): Floating popover component.
- [Tooltip](https://ui.shadcn.com/docs/components/tooltip): Tooltip component for additional context.
- [Hover Card](https://ui.shadcn.com/docs/components/hover-card): Card that appears on hover.
- [Context Menu](https://ui.shadcn.com/docs/components/context-menu): Right-click context menu.
- [Dropdown Menu](https://ui.shadcn.com/docs/components/dropdown-menu): Dropdown menu component.
- [Menubar](https://ui.shadcn.com/docs/components/menubar): Horizontal menubar component.
- [Command](https://ui.shadcn.com/docs/components/command): Command palette component (cmdk).
### Feedback & Status
- [Alert](https://ui.shadcn.com/docs/components/alert): Alert component for messages and notifications.
- [Toast](https://ui.shadcn.com/docs/components/toast): Toast notification component using Sonner.
- [Sonner](https://ui.shadcn.com/docs/components/sonner): Opinionated toast component for React.
- [Progress](https://ui.shadcn.com/docs/components/progress): Progress bar component.
- [Spinner](https://ui.shadcn.com/docs/components/spinner): Loading spinner component.
- [Skeleton](https://ui.shadcn.com/docs/components/skeleton): Skeleton loading placeholder.
- [Badge](https://ui.shadcn.com/docs/components/badge): Badge component for labels and status indicators.
- [Empty](https://ui.shadcn.com/docs/components/empty): Empty state component for no data scenarios.
### Display & Media
- [Avatar](https://ui.shadcn.com/docs/components/avatar): Avatar component for user profiles.
- [Card](https://ui.shadcn.com/docs/components/card): Card container component.
- [Table](https://ui.shadcn.com/docs/components/table): Table component for displaying data.
- [Data Table](https://ui.shadcn.com/docs/components/data-table): Advanced data table with sorting, filtering, and pagination.
- [Chart](https://ui.shadcn.com/docs/components/chart): Chart components using Recharts.
- [Carousel](https://ui.shadcn.com/docs/components/carousel): Carousel component using Embla Carousel.
- [Aspect Ratio](https://ui.shadcn.com/docs/components/aspect-ratio): Container that maintains aspect ratio.
- [Typography](https://ui.shadcn.com/docs/components/typography): Typography styles and components.
- [Item](https://ui.shadcn.com/docs/components/item): Generic item component for lists and menus.
- [Kbd](https://ui.shadcn.com/docs/components/kbd): Keyboard shortcut display component.
### Misc
- [Collapsible](https://ui.shadcn.com/docs/components/collapsible): Collapsible container component.
- [Toggle](https://ui.shadcn.com/docs/components/toggle): Toggle button component.
- [Toggle Group](https://ui.shadcn.com/docs/components/toggle-group): Group of toggle buttons.
- [Pagination](https://ui.shadcn.com/docs/components/pagination): Pagination component for lists and tables.
- [Direction](https://ui.shadcn.com/docs/components/direction): Text direction provider for RTL support.
## Dark Mode
- [Dark Mode](https://ui.shadcn.com/docs/dark-mode): Overview of dark mode implementation.
- [Dark Mode - Next.js](https://ui.shadcn.com/docs/dark-mode/next): Dark mode setup for Next.js.
- [Dark Mode - Vite](https://ui.shadcn.com/docs/dark-mode/vite): Dark mode setup for Vite.
- [Dark Mode - Astro](https://ui.shadcn.com/docs/dark-mode/astro): Dark mode setup for Astro.
- [Dark Mode - Remix](https://ui.shadcn.com/docs/dark-mode/remix): Dark mode setup for Remix.
## RTL
- [RTL](https://ui.shadcn.com/docs/rtl): Overview of right-to-left language support.
- [RTL - Next.js](https://ui.shadcn.com/docs/rtl/next): RTL setup for Next.js.
- [RTL - Vite](https://ui.shadcn.com/docs/rtl/vite): RTL setup for Vite.
- [RTL - TanStack Start](https://ui.shadcn.com/docs/rtl/start): RTL setup for TanStack Start.
## Forms
- [Forms Overview](https://ui.shadcn.com/docs/forms): Guide to building forms with shadcn/ui.
- [React Hook Form](https://ui.shadcn.com/docs/forms/react-hook-form): Using shadcn/ui with React Hook Form.
- [TanStack Form](https://ui.shadcn.com/docs/forms/tanstack-form): Using shadcn/ui with TanStack Form.
- [Formisch](https://ui.shadcn.com/docs/forms/formisch): Using shadcn/ui with Formisch.
- [Forms - Next.js](https://ui.shadcn.com/docs/forms/next): Building forms in Next.js with Server Actions.
## Advanced
- [Monorepo](https://ui.shadcn.com/docs/monorepo): Using shadcn/ui in a monorepo setup.
- [React 19](https://ui.shadcn.com/docs/react-19): React 19 support and migration guide.
- [Tailwind CSS v4](https://ui.shadcn.com/docs/tailwind-v4): Tailwind CSS v4 support and setup.
- [JavaScript](https://ui.shadcn.com/docs/javascript): Using shadcn/ui with JavaScript (no TypeScript).
- [Figma](https://ui.shadcn.com/docs/figma): Figma design resources.
- [v0](https://ui.shadcn.com/docs/v0): Generating UI with v0 by Vercel.
## MCP Server
- [MCP Server](https://ui.shadcn.com/docs/mcp): Model Context Protocol server for AI integrations. Allows AI assistants to browse, search, and install components from registries using natural language. Works with Claude Code, Cursor, VS Code (GitHub Copilot), Codex and more.
## Registry
- [Registry Overview](https://ui.shadcn.com/docs/registry): Creating and publishing your own component registry.
- [Getting Started](https://ui.shadcn.com/docs/registry/getting-started): Set up your own registry.
- [Examples](https://ui.shadcn.com/docs/registry/examples): Example registries.
- [FAQ](https://ui.shadcn.com/docs/registry/faq): Common questions about registries.
- [Authentication](https://ui.shadcn.com/docs/registry/authentication): Adding authentication to your registry.
- [Registry MCP](https://ui.shadcn.com/docs/registry/mcp): MCP integration for registries.
- [Namespaces](https://ui.shadcn.com/docs/registry/namespace): Using multiple registries with namespace support.
- [Add a Registry](https://ui.shadcn.com/docs/registry/registry-index): Open source registry index and how to submit yours.
- [Open in v0](https://ui.shadcn.com/docs/registry/open-in-v0): Integrating your registry with Open in v0.
- [registry.json](https://ui.shadcn.com/docs/registry/registry-json): `registry.json` schema for your own registry.
- [registry-item.json](https://ui.shadcn.com/docs/registry/registry-item-json): `registry-item.json` specification for registry items.
### Registry Schemas
- [Registry Schema](https://ui.shadcn.com/schema/registry.json): JSON Schema for registry index files. Defines the structure for a collection of components, hooks, pages, etc. Requires name, homepage, and items array.
- [Registry Item Schema](https://ui.shadcn.com/schema/registry-item.json): JSON Schema for individual registry items. Defines components, hooks, themes, and other distributable code with properties for dependencies, files, Tailwind config, CSS variables, and more.
+17459 -416
View File
File diff suppressed because it is too large Load Diff
+43 -22
View File
@@ -3,38 +3,59 @@
"private": true,
"version": "0.0.0",
"type": "module",
"imports": {
"@/*": "./src/*"
},
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"genapi": "node genapi.js"
"genapi": "node genapi.js",
"typecheck": "tsc -b --pretty false",
"format": "biome format --write",
"lint": "biome lint",
"check": "biome check --write"
},
"dependencies": {
"@solid-primitives/history": "^0.2.3",
"@solid-primitives/i18n": "^2.2.1",
"@solid-primitives/keyboard": "^1.3.5",
"@solid-primitives/sse": "^0.0.102",
"@solid-primitives/storage": "^4.3.4",
"@solid-primitives/websocket": "^1.4.0",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.16.1",
"@tailwindcss/vite": "^4.3.0",
"@tanstack/solid-query": "^5.101.0",
"@base-ui/react": "^1.5.0",
"@fontsource-variable/geist": "^5.2.9",
"@hookform/resolvers": "^5.4.0",
"@tanstack/react-form": "^1.33.0",
"@tanstack/react-query": "^5.101.0",
"@tanstack/react-table": "^8.21.3",
"ahooks": "^3.9.7",
"axios": "^1.17.0",
"ky": "^2.0.2",
"solid-icons": "^1.2.0",
"solid-js": "^1.9.12",
"tailwindcss": "^4.3.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.4.0",
"embla-carousel-react": "^8.6.0",
"input-otp": "^1.4.2",
"lucide-react": "^1.17.0",
"next-themes": "^0.4.6",
"radix-ui": "^1.5.0",
"react": "^19.2.7",
"react-day-picker": "^10.0.1",
"react-dom": "^19.2.7",
"react-hook-form": "^7.78.0",
"react-resizable-panels": "^4.11.2",
"react-router-dom": "^7.17.0",
"recharts": "3.8.0",
"shadcn": "^4.11.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.6.0",
"tw-animate-css": "^1.4.0",
"vaul": "^1.1.2",
"zod": "^4.4.3"
},
"devDependencies": {
"@types/node": "^24.12.3",
"@biomejs/biome": "^2.4.16",
"@tailwindcss/vite": "^4.3.0",
"@types/node": "^25.9.2",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.2",
"openapi-typescript-codegen": "^0.30.0",
"tailwindcss": "^4.3.0",
"typescript": "~6.0.2",
"vite": "^8.0.12",
"vite-plugin-solid": "^2.11.12"
}
"vite": "^8.0.12"
},
"packageManager": "bun"
}
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-24
View File
@@ -1,24 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="bluesky-icon" viewBox="0 0 16 17">
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
</symbol>
<symbol id="discord-icon" viewBox="0 0 20 19">
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
</symbol>
<symbol id="documentation-icon" viewBox="0 0 21 20">
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
</symbol>
<symbol id="github-icon" viewBox="0 0 19 19">
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
</symbol>
<symbol id="social-icon" viewBox="0 0 20 20">
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
</symbol>
<symbol id="x-icon" viewBox="0 0 19 19">
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
</symbol>
</svg>

Before

Width:  |  Height:  |  Size: 4.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

+9
View File
@@ -0,0 +1,9 @@
User-agent: *
Allow: /
# Prevent indexing authentication and user-private management pages
Disallow: /auth/
Disallow: /settings
Sitemap: https://gitdata.ai/sitemap.xml
+11
View File
@@ -0,0 +1,11 @@
{
"version": 1,
"skills": {
"shadcn": {
"source": "shadcn/ui",
"sourceType": "github",
"skillPath": "skills/shadcn/SKILL.md",
"computedHash": "ac9d0d69caac7de1d1e5647f3db3bcd2f13af355d6b3a78780fbf7fc80e8dca0"
}
}
}
-184
View File
@@ -1,184 +0,0 @@
.counter {
font-size: 16px;
padding: 5px 10px;
border-radius: 5px;
color: var(--accent);
background: var(--accent-bg);
border: 2px solid transparent;
transition: border-color 0.3s;
margin-bottom: 24px;
&:hover {
border-color: var(--accent-border);
}
&:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
}
.hero {
position: relative;
.base,
.framework,
.vite {
inset-inline: 0;
margin: 0 auto;
}
.base {
width: 170px;
position: relative;
z-index: 0;
}
.framework,
.vite {
position: absolute;
}
.framework {
z-index: 1;
top: 34px;
height: 28px;
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
scale(1.4);
}
.vite {
z-index: 0;
top: 107px;
height: 26px;
width: auto;
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
scale(0.8);
}
}
#center {
display: flex;
flex-direction: column;
gap: 25px;
place-content: center;
place-items: center;
flex-grow: 1;
@media (max-width: 1024px) {
padding: 32px 20px 24px;
gap: 18px;
}
}
#next-steps {
display: flex;
border-top: 1px solid var(--border);
text-align: left;
& > div {
flex: 1 1 0;
padding: 32px;
@media (max-width: 1024px) {
padding: 24px 20px;
}
}
.icon {
margin-bottom: 16px;
width: 22px;
height: 22px;
}
@media (max-width: 1024px) {
flex-direction: column;
text-align: center;
}
}
#docs {
border-right: 1px solid var(--border);
@media (max-width: 1024px) {
border-right: none;
border-bottom: 1px solid var(--border);
}
}
#next-steps ul {
list-style: none;
padding: 0;
display: flex;
gap: 8px;
margin: 32px 0 0;
.logo {
height: 18px;
}
a {
color: var(--text-h);
font-size: 16px;
border-radius: 6px;
background: var(--social-bg);
display: flex;
padding: 6px 12px;
align-items: center;
gap: 8px;
text-decoration: none;
transition: box-shadow 0.3s;
&:hover {
box-shadow: var(--shadow);
}
.button-icon {
height: 18px;
width: 18px;
}
}
@media (max-width: 1024px) {
margin-top: 20px;
flex-wrap: wrap;
justify-content: center;
li {
flex: 1 1 calc(50% - 8px);
}
a {
width: 100%;
justify-content: center;
box-sizing: border-box;
}
}
}
#spacer {
height: 88px;
border-top: 1px solid var(--border);
@media (max-width: 1024px) {
height: 48px;
}
}
.ticks {
position: relative;
width: 100%;
&::before,
&::after {
content: '';
position: absolute;
top: -4.5px;
border: 5px solid transparent;
}
&::before {
left: 0;
border-left-color: var(--border);
}
&::after {
right: 0;
border-right-color: var(--border);
}
}
+3 -1
View File
@@ -1 +1,3 @@
export default function App() { return null; }
// App root — moved to src/routes.ts + src/pages/
// 路由已迁移至 Data ModecreateBrowserRouter + RouterProvider
// 入口见 src/index.tsx,路由配置见 src/routes.ts
-579
View File
@@ -1,579 +0,0 @@
/* ─────────────────────────────────────────────────────────────────
* Authks — Design System Tokens (Light + Dark)
* ───────────────────────────────────────────────────────────────── */
/* Override #root during auth pages */
.auth-page #root {
width: 100%;
max-width: none;
border: none;
text-align: left;
padding: 0;
margin: 0;
}
.auth-root {
/* Reset conflicting styles from index.css */
margin: 0;
padding: 0;
border: none;
/* Surfaces */
--bg: #ffffff;
--surface: #f5f5f7;
--surface-warm: #fbfbfd;
/* Foreground ramp */
--fg: #1d1d1f;
--fg-2: #424245;
--muted: #6e6e73;
--meta: #86868b;
/* Borders */
--border: #d2d2d7;
--border-soft: #e8e8ed;
/* Accent */
--accent: #0071e3;
--accent-on: #ffffff;
--accent-hover: #0077ed;
--accent-active: #0066cc;
/* Semantic */
--success: #16a34a;
--warn: #eab308;
--danger: #dc2626;
/* Typography */
--font-display: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", "Inter", system-ui, -apple-system, sans-serif;
--font-body: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Inter", system-ui, -apple-system, sans-serif;
--font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
/* Radius */
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 18px;
--radius-pill: 980px;
/* Motion */
--motion-fast: 150ms;
--motion-base: 220ms;
--ease-standard: cubic-bezier(0.28, 0, 0.22, 1);
/* Focus */
--focus-ring: 0 0 0 4px color-mix(in oklab, var(--accent), transparent 65%);
/* Elevation */
--elev-flat: none;
--elev-ring: 0 0 0 1px var(--border);
--elev-raised: 0 12px 32px rgba(0, 0, 0, 0.08);
font-family: var(--font-body);
font-size: 17px;
line-height: 1.47;
color: var(--fg);
background: var(--surface);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
min-height: 100dvh;
}
@media (prefers-color-scheme: dark) {
.auth-root {
--bg: #1c1c1e;
--surface: #2c2c2e;
--surface-warm: #232325;
--fg: #f5f5f7;
--fg-2: #d1d1d6;
--muted: #98989d;
--meta: #86868b;
--border: #48484a;
--border-soft: #38383a;
--accent: #0a84ff;
--accent-on: #ffffff;
--accent-hover: #409cff;
--accent-active: #0071e3;
--success: #30d158;
--warn: #ffd60a;
--danger: #ff453a;
--elev-raised: 0 12px 32px rgba(0, 0, 0, 0.4);
}
}
.auth-root *,
.auth-root ::before,
.auth-root ::after {
box-sizing: border-box;
}
.auth-root h1,
.auth-root h2,
.auth-root h3,
.auth-root h4,
.auth-root h5,
.auth-root h6 {
font-family: var(--font-display);
font-weight: 600;
font-size: inherit;
letter-spacing: -0.015em;
margin: 0;
}
.auth-root a {
color: var(--accent);
text-decoration: none;
transition: color var(--motion-fast) var(--ease-standard);
}
.auth-root a:hover {
color: var(--accent-hover);
text-decoration: underline;
}
/* ─── Form field base ─────────────────────────────────────────────── */
.auth-root .field {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
}
.auth-root .field label {
font-size: 14px;
font-weight: 600;
color: var(--fg);
}
.auth-root .field .field-optional {
font-size: 12px;
font-weight: 400;
color: var(--meta);
margin-left: 4px;
}
.auth-root .field input {
width: 100%;
min-width: 0;
height: 48px;
padding: 0 16px;
font-family: var(--font-body);
font-size: 17px;
color: var(--fg);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
outline: none;
transition: border-color var(--motion-fast) var(--ease-standard),
box-shadow var(--motion-fast) var(--ease-standard);
}
.auth-root .field input::placeholder {
color: var(--meta);
}
.auth-root .field input:hover {
border-color: var(--meta);
}
.auth-root .field input:focus-visible {
border-color: var(--accent);
box-shadow: var(--focus-ring);
}
.auth-root .field input.input-error {
border-color: var(--danger);
}
.auth-root .field input.input-error:focus-visible {
box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger), transparent 65%);
}
.auth-root .field input:disabled {
opacity: 0.6;
cursor: not-allowed;
background: var(--surface);
}
/* ─── Password group ──────────────────────────────────────────────── */
.auth-root .password-group {
position: relative;
display: flex;
align-items: center;
}
.auth-root .password-group input {
width: 100%;
height: 48px;
padding: 0 44px 0 16px;
font-family: var(--font-body);
font-size: 17px;
color: var(--fg);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
outline: none;
transition: border-color var(--motion-fast) var(--ease-standard),
box-shadow var(--motion-fast) var(--ease-standard);
}
.auth-root .password-group input::placeholder {
color: var(--meta);
}
.auth-root .password-group input:hover {
border-color: var(--meta);
}
.auth-root .password-group input:focus-visible {
border-color: var(--accent);
box-shadow: var(--focus-ring);
}
.auth-root .password-group input.input-error {
border-color: var(--danger);
}
.auth-root .password-group input.input-error:focus-visible {
box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger), transparent 65%);
}
.auth-root .password-group input:disabled {
opacity: 0.6;
cursor: not-allowed;
background: var(--surface);
}
.auth-root .eye-btn {
position: absolute;
right: 8px;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: transparent;
border: none;
border-radius: 6px;
cursor: pointer;
color: var(--meta);
transition: background var(--motion-fast) var(--ease-standard);
}
.auth-root .eye-btn:hover {
background: color-mix(in oklab, var(--fg), transparent 94%);
}
.auth-root .eye-btn:focus-visible {
outline: none;
box-shadow: var(--focus-ring);
}
/* ─── Error banner ─────────────────────────────────────────────────── */
.auth-root .error-banner {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 16px;
font-size: 14px;
color: var(--danger);
background: color-mix(in oklab, var(--danger), transparent 92%);
border: 1px solid color-mix(in oklab, var(--danger), transparent 80%);
border-radius: 12px;
line-height: 1.4;
}
.auth-root .error-banner[role="alert"]:focus {
outline: none;
box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger), transparent 65%);
}
/* ─── Buttons ────────────────────────────────────────────────────── */
.auth-root .btn-primary {
display: inline-flex;
align-items: center;
justify-content: center;
height: 48px;
padding: 0 24px;
font-family: var(--font-body);
font-size: 17px;
font-weight: 600;
color: var(--accent-on);
background: var(--accent);
border: none;
border-radius: var(--radius-md);
cursor: pointer;
transition: background var(--motion-fast) var(--ease-standard),
transform var(--motion-fast) var(--ease-standard);
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.auth-root .btn-primary:hover {
background: var(--accent-hover);
}
.auth-root .btn-primary:active {
background: var(--accent-active);
transform: scale(0.98);
}
.auth-root .btn-primary:focus-visible {
outline: none;
box-shadow: var(--focus-ring);
}
.auth-root .btn-primary:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.auth-root .btn-secondary {
display: inline-flex;
align-items: center;
justify-content: center;
height: 48px;
padding: 0 20px;
font-family: var(--font-body);
font-size: 17px;
font-weight: 600;
color: var(--accent);
background: transparent;
border: 1px solid var(--border-soft);
border-radius: var(--radius-md);
cursor: pointer;
transition: background var(--motion-fast) var(--ease-standard),
border-color var(--motion-fast) var(--ease-standard);
}
.auth-root .btn-secondary:hover {
background: color-mix(in oklab, var(--accent), transparent 92%);
border-color: color-mix(in oklab, var(--accent), transparent 70%);
}
.auth-root .btn-secondary:focus-visible {
outline: none;
box-shadow: var(--focus-ring);
}
.auth-root .btn-block {
width: 100%;
}
/* ─── Form layout primitives ──────────────────────────────────────── */
.auth-root .form-stack {
display: flex;
flex-direction: column;
gap: 20px;
}
.auth-root .form-row {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 16px;
width: 100%;
}
@media (max-width: 600px) {
.auth-root .form-row {
grid-template-columns: 1fr;
gap: 14px;
}
}
.auth-root .form-header {
font-family: var(--font-display);
font-size: 28px;
font-weight: 600;
color: var(--fg);
letter-spacing: -0.015em;
text-align: center;
margin: 0 0 2px;
}
.auth-root .form-desc {
font-family: var(--font-body);
font-size: 15px;
color: var(--muted);
line-height: 1.47;
text-align: center;
margin: 0;
}
.auth-root .form-hint {
font-family: var(--font-body);
font-size: 13px;
color: var(--meta);
line-height: 1.4;
margin: -8px 0 0;
}
/* ─── Divider ──────────────────────────────────────────────────────── */
.auth-root .auth-divider {
display: flex;
align-items: center;
gap: 16px;
margin: 2px 0;
}
.auth-root .auth-divider::before,
.auth-root .auth-divider::after {
content: '';
flex: 1;
height: 1px;
background: var(--border-soft);
}
.auth-root .auth-divider span {
font-family: var(--font-body);
font-size: 13px;
color: var(--meta);
flex-shrink: 0;
}
/* ─── Spinner ──────────────────────────────────────────────────────── */
.auth-root .spinner-sm {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 0.6s linear infinite;
flex-shrink: 0;
}
/* ─── Back link ────────────────────────────────────────────────────── */
.auth-root .back-link {
display: inline-flex;
align-items: center;
gap: 6px;
font-family: var(--font-body);
font-size: 14px;
font-weight: 500;
color: var(--muted);
text-decoration: none;
transition: color var(--motion-fast) var(--ease-standard);
}
.auth-root .back-link:hover {
color: var(--fg);
text-decoration: none;
}
.auth-root .forgot-link-row {
display: flex;
justify-content: flex-end;
margin-top: -8px;
}
/* ─── Status icon ──────────────────────────────────────────────────── */
.auth-root .status-icon {
width: 56px;
height: 56px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.auth-root .status-icon--accent {
background: color-mix(in oklab, var(--accent), transparent 90%);
}
.auth-root .status-icon--success {
background: color-mix(in oklab, var(--success), transparent 90%);
}
.auth-root .status-icon--warn {
background: color-mix(in oklab, var(--warn), transparent 90%);
}
/* ─── Strength meter ──────────────────────────────────────────────── */
.auth-root .strength-meter {
display: flex;
align-items: center;
gap: 10px;
margin-top: -2px;
}
.auth-root .strength-meter__track {
flex: 1;
height: 4px;
background: var(--border-soft);
border-radius: 2px;
overflow: hidden;
}
.auth-root .strength-meter__fill {
height: 100%;
border-radius: 2px;
transition: width var(--motion-base) var(--ease-standard),
background var(--motion-base) var(--ease-standard);
}
.auth-root .strength-meter__label {
font-family: var(--font-body);
font-size: 13px;
font-weight: 500;
min-width: 32px;
text-align: right;
}
/* ─── Captcha ───────────────────────────────────────────────────── */
.auth-root .captcha-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.auth-root .captcha-group label {
font-size: 14px;
font-weight: 600;
color: var(--fg);
}
.auth-root .captcha-row {
display: flex;
gap: 12px;
align-items: center;
}
.auth-root .captcha-row img {
height: 48px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-soft);
cursor: pointer;
flex-shrink: 0;
}
.auth-root .captcha-row input {
flex: 1;
min-width: 0;
height: 48px;
padding: 0 16px;
font-family: var(--font-body);
font-size: 17px;
color: var(--fg);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
outline: none;
transition: border-color var(--motion-fast) var(--ease-standard),
box-shadow var(--motion-fast) var(--ease-standard);
}
.auth-root .captcha-row input::placeholder {
color: var(--meta);
}
.auth-root .captcha-row input:focus-visible {
border-color: var(--accent);
box-shadow: var(--focus-ring);
}
/* ─── PIN code input ─────────────────────────────────────────────── */
.auth-root .pin-code-row {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 8px;
}
.auth-root .pin-code-input {
width: 100%;
min-width: 0;
height: 52px;
padding: 0;
font-family: var(--font-mono);
font-size: 24px;
font-weight: 600;
color: var(--fg);
text-align: center;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
outline: none;
transition: border-color var(--motion-fast) var(--ease-standard),
box-shadow var(--motion-fast) var(--ease-standard),
transform var(--motion-fast) var(--ease-standard);
}
.auth-root .pin-code-input:focus-visible {
border-color: var(--accent);
box-shadow: var(--focus-ring);
transform: translateY(-1px);
}
.auth-root .pin-code-input:disabled {
opacity: 0.6;
cursor: not-allowed;
background: var(--surface);
}
/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
to { transform: rotate(360deg); }
}
-61
View File
@@ -1,61 +0,0 @@
import { onMount, onCleanup, type JSX } from 'solid-js';
import '@/app/auth/auth.css';
interface AuthLayoutProps {
children: JSX.Element;
eyebrow?: string;
maxWidth?: number;
}
export default function AuthLayout({ children, eyebrow, maxWidth }: AuthLayoutProps) {
onMount(() => document.documentElement.classList.add('auth-page'));
onCleanup(() => document.documentElement.classList.remove('auth-page'));
return (
<div class="auth-root" style={s.wrapper}>
<div style={s.backdrop} />
<div style={{ ...s.container, 'max-width': `${maxWidth ?? 460}px` }}>
<header style={s.header}>
<p style={s.brandName}>AppKS</p>
</header>
{eyebrow && <p style={s.eyebrow}>{eyebrow}</p>}
<div style={s.card}>{children}</div>
<footer style={s.footer}>
&copy; {new Date().getFullYear()} AppKS. All rights reserved.
</footer>
</div>
</div>
);
}
const s: Record<string, JSX.CSSProperties> = {
wrapper: {
position: 'relative', display: 'flex', 'justify-content': 'center',
'min-height': '100dvh', padding: '48px 16px',
},
backdrop: {
position: 'fixed', inset: '0', background: 'var(--surface)', 'z-index': '0',
},
container: {
position: 'relative', 'z-index': '1', width: '100%',
display: 'flex', 'flex-direction': 'column', 'align-items': 'center',
gap: '24px', animation: 'fade-in 0.4s var(--ease-standard) both', margin: 'auto 0',
},
header: { display: 'flex', 'align-items': 'center', gap: '12px' },
brandName: {
'font-family': 'var(--font-display)', 'font-size': '22px', 'font-weight': '600',
color: 'var(--fg)', 'letter-spacing': '-0.015em', 'line-height': '1.15', margin: '0',
},
eyebrow: {
'font-family': 'var(--font-body)', 'font-size': '14px', 'font-weight': '500',
color: 'var(--muted)', 'text-align': 'center', margin: '-8px 0 0',
},
card: {
width: '100%', background: 'var(--bg)', border: '1px solid var(--border-soft)',
'border-radius': '18px', padding: '32px 28px', 'box-shadow': 'var(--elev-raised)',
},
footer: {
'font-family': 'var(--font-body)', 'font-size': '12px', color: 'var(--meta)',
'letter-spacing': '0.02em', 'margin-top': '4px',
},
};
-31
View File
@@ -1,31 +0,0 @@
export function CaptchaBox(props: {
image: string;
value: string;
onChange: (v: string) => void;
onRefresh: () => void;
id?: string;
}) {
const inputId = props.id ?? 'captcha-input';
return (
<div class="captcha-group">
<label for={inputId}>Captcha</label>
<div class="captcha-row">
<img
src={props.image ? `data:image/png;base64,${props.image}` : ''}
alt="Captcha"
onClick={props.onRefresh}
title="Click to refresh"
/>
<input
id={inputId}
type="text"
autocomplete="off"
placeholder="Enter captcha"
value={props.value}
onInput={(e) => props.onChange(e.currentTarget.value)}
/>
</div>
</div>
);
}
-135
View File
@@ -1,135 +0,0 @@
import { createSignal, onCleanup, onMount, type JSX } from 'solid-js';
import { PASSWORD_MAX_LENGTH, calcStrength, meetsPasswordPolicy } from '@/app/auth/lib/password';
function WarningCircle(props: { size: number; color: string }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill={props.color}
style={{ 'flex-shrink': '0' }}>
<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z" />
</svg>
);
}
function Eye(props: { size: number; color: string }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill={props.color}>
<path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-59.27-12.14-82.34-35.23C28.75,139.87,22.81,124.64,22.09,122.63a.49.49,0,0,1,0-.26c.72-2,6.66-17.25,23.57-34.14C68.73,65.14,97.22,53,128,53s59.27,12.14,82.34,35.23c16.91,16.89,22.85,32.12,23.57,34.14a.49.49,0,0,1,0,.26c-.72,2-6.66,17.25-23.57,34.14C187.27,179.86,158.78,192,128,192Zm0-112a42,42,0,1,0,42,42A42,42,0,0,0,128,80Zm0,68a26,26,0,1,1,26-26A26,26,0,0,1,128,148Z" />
</svg>
);
}
function EyeSlash(props: { size: number; color: string }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill={props.color}>
<path d="M53.92,34.62A8,8,0,1,0,42.08,45.38l22.59,24.7A105.07,105.07,0,0,0,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a108.07,108.07,0,0,0,48.78-11.62l25.3,27.7a8,8,0,1,0,11.84-10.76L66.4,40.37A8,8,0,0,0,53.92,34.62ZM78.29,80.44l115.42,126.3A90.81,90.81,0,0,1,128,192c-30.78,0-59.27-12.14-82.34-35.23C28.75,139.87,22.81,124.64,22.09,122.63a.49.49,0,0,1,0-.26c.72-2,6.66-17.25,23.57-34.14A89.86,89.86,0,0,1,78.29,80.44ZM128,80a41.91,41.91,0,0,1,39.9,28.82l-56.1-61.4A42.17,42.17,0,0,1,128,80Zm91.66,6.35c18.83,18.83,27.3,37.61,27.65,38.4a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4A106.06,106.06,0,0,1,154.24,197l-11.33-12.41a90.71,90.71,0,0,0,38.76-27.82c16.91-16.89,22.85-32.12,23.57-34.14a.49.49,0,0,0,0-.26c-.72-2-6.66-17.25-23.57-34.14a91,91,0,0,0-28-18.51l-11.3-12.38A106,106,0,0,1,219.66,86.35Z" />
</svg>
);
}
export function ErrorMessage(props: { children: JSX.Element; id?: string }) {
let ref: HTMLDivElement | undefined;
onMount(() => {
const timeoutId = window.setTimeout(() => ref?.focus(), 0);
onCleanup(() => window.clearTimeout(timeoutId));
});
return (
<div ref={ref} id={props.id} class="error-banner" role="alert" tabIndex={-1}>
<WarningCircle size={16} color="var(--danger)" />
<span>{props.children}</span>
</div>
);
}
export function SubmitButton(props: {
loading: boolean;
disabled?: boolean;
loadingText?: string;
children: JSX.Element;
}) {
return (
<button type="submit" class="btn-primary btn-block" disabled={props.loading || props.disabled}>
{props.loading ? (
<span style={{ display: 'inline-flex', 'align-items': 'center', gap: '8px' }}>
<span class="spinner-sm" />
{props.loadingText ?? 'Please wait…'}
</span>
) : (props.children)}
</button>
);
}
interface PasswordFieldProps {
id: string;
label: string;
value: string;
onChange: (v: string) => void;
placeholder?: string;
autoComplete?: string;
autofocus?: boolean;
hasError?: boolean;
describedBy?: string;
disabled?: boolean;
maxLength?: number;
}
export function PasswordField(props: PasswordFieldProps) {
const [visible, setVisible] = createSignal(false);
return (
<div class="field">
<label for={props.id}>{props.label}</label>
<div class="password-group">
<input
id={props.id}
type={visible() ? 'text' : 'password'}
autocomplete={props.autoComplete ?? 'current-password'}
placeholder={props.placeholder ?? '••••••••'}
value={props.value}
onInput={(e) => props.onChange(e.currentTarget.value)}
autofocus={props.autofocus}
class={props.hasError ? 'input-error' : ''}
aria-invalid={props.hasError}
aria-describedby={props.describedBy}
disabled={props.disabled}
maxLength={props.maxLength ?? PASSWORD_MAX_LENGTH}
/>
<button
type="button"
onClick={() => setVisible(!visible())}
class="eye-btn"
tabIndex={-1}
aria-pressed={visible()}
aria-label={visible() ? 'Hide password' : 'Show password'}
>
{visible() ? <EyeSlash size={18} color="var(--meta)" />
: <Eye size={18} color="var(--meta)" />}
</button>
</div>
</div>
);
}
const STRENGTH_LABELS = ['', 'Weak', 'Fair', 'Strong', 'Very strong'];
export function StrengthMeter(props: { password: string }) {
if (!props.password) return null;
const score = calcStrength(props.password);
const label = STRENGTH_LABELS[score] || '';
const color = score <= 1 ? 'var(--danger)' : score === 2 ? 'var(--warn)' : 'var(--success)';
return (
<div class="strength-meter">
<div class="strength-meter__track">
<div
class="strength-meter__fill"
style={{ width: `${(score / 4) * 100}%`, background: color }}
/>
</div>
<span class="strength-meter__label" style={{ color }}>{label}</span>
</div>
);
}
export { meetsPasswordPolicy, calcStrength };
-87
View File
@@ -1,87 +0,0 @@
import { For } from 'solid-js';
interface PinCodeInputProps {
id: string;
label: string;
value: string;
length?: number;
disabled?: boolean;
autofocus?: boolean;
onChange: (value: string) => void;
onComplete?: (value: string) => void;
}
export function PinCodeInput(props: PinCodeInputProps) {
const length = () => props.length ?? 6;
const indexes = () => Array.from({ length: length() }, (_, i) => i);
const digits = () => props.value.padEnd(length()).slice(0, length()).split('');
const inputs: HTMLInputElement[] = [];
function commit(next: string[]) {
const value = next.join('').slice(0, length());
props.onChange(value);
if (value.length === length()) props.onComplete?.(value);
}
function setFrom(index: number, raw: string) {
const values = digits();
const chars = raw.replace(/\D/g, '').slice(0, length() - index).split('');
if (chars.length === 0) {
values[index] = '';
commit(values);
return;
}
chars.forEach((char, offset) => { values[index + offset] = char; });
commit(values);
const nextIndex = Math.min(index + chars.length, length() - 1);
inputs[nextIndex]?.focus();
}
function handleKeyDown(index: number, e: KeyboardEvent) {
if (e.key !== 'Backspace') return;
const values = digits();
if (values[index]) {
values[index] = '';
commit(values);
return;
}
if (index > 0) {
e.preventDefault();
values[index - 1] = '';
commit(values);
inputs[index - 1]?.focus();
}
}
return (
<div class="field pin-field">
<label id={`${props.id}-label`}>{props.label}</label>
<div class="pin-code-row" role="group" aria-labelledby={`${props.id}-label`}>
<For each={indexes()}>{(index) => (
<input
ref={(el) => { inputs[index] = el; }}
id={index === 0 ? props.id : undefined}
class="pin-code-input"
type="text"
inputmode="numeric"
pattern="[0-9]*"
autocomplete={index === 0 ? 'one-time-code' : 'off'}
value={digits()[index]}
maxlength={1}
disabled={props.disabled}
autofocus={props.autofocus && index === 0}
aria-label={`Digit ${index + 1} of ${length()}`}
onInput={(e) => setFrom(index, e.currentTarget.value)}
onKeyDown={(e) => handleKeyDown(index, e)}
onPaste={(e) => {
e.preventDefault();
setFrom(index, e.clipboardData?.getData('text') ?? '');
}}
/>
)}</For>
</div>
</div>
);
}
-46
View File
@@ -1,46 +0,0 @@
import { createSignal, onCleanup, onMount } from 'solid-js';
import { AuthService } from '@/client';
import type { ApiResponse_CaptchaResponse } from '@/client';
export function useCaptcha() {
const [captcha, setCaptcha] = createSignal({ image: '', rsaKey: null as string | null });
const [captchaError, setCaptchaError] = createSignal('');
const [captchaLoading, setCaptchaLoading] = createSignal(false);
let requestId = 0;
let disposed = false;
const refresh = async (): Promise<boolean> => {
const currentRequest = ++requestId;
setCaptchaLoading(true);
setCaptchaError('');
try {
const res: ApiResponse_CaptchaResponse = await AuthService.authGetCaptcha({
w: 200, h: 60, dark: false, rsa: true,
});
if (disposed || currentRequest !== requestId) return false;
setCaptcha({
image: res.data.base64,
rsaKey: res.data.rsa?.public_key ?? null,
});
return true;
} catch {
if (!disposed && currentRequest === requestId) {
setCaptcha({ image: '', rsaKey: null });
setCaptchaError('Captcha failed to load. Please refresh and try again.');
}
return false;
} finally {
if (!disposed && currentRequest === requestId) setCaptchaLoading(false);
}
};
onMount(() => { void refresh(); });
onCleanup(() => {
disposed = true;
requestId++;
});
return { captcha, captchaError, captchaLoading, refresh };
}
-22
View File
@@ -1,22 +0,0 @@
export const PASSWORD_MIN_LENGTH = 12;
export const PASSWORD_MAX_LENGTH = 128;
function categoryCount(pw: string): number {
const has = [/[A-Z]/.test(pw), /[a-z]/.test(pw), /\d/.test(pw), /[^a-zA-Z0-9]/.test(pw)];
return has.filter(Boolean).length;
}
export function meetsPasswordPolicy(pw: string): boolean {
return pw.length >= PASSWORD_MIN_LENGTH && categoryCount(pw) >= 3;
}
export function calcStrength(pw: string): number {
if (!pw) return 0;
let s = 0;
if (pw.length >= PASSWORD_MIN_LENGTH) s++;
if (pw.length >= 16) s++;
if (/[a-z]/.test(pw) && /[A-Z]/.test(pw)) s++;
if (/\d/.test(pw)) s++;
if (/[^a-zA-Z0-9]/.test(pw)) s++;
return Math.min(s, 4);
}
-91
View File
@@ -1,91 +0,0 @@
function pemToDer(pem: string): Uint8Array {
const b64 = pem
.replace(/-----BEGIN (?:RSA |)PUBLIC KEY-----/g, '')
.replace(/-----END (?:RSA |)PUBLIC KEY-----/g, '')
.replace(/\s/g, '');
if (!b64) throw new Error('Invalid RSA public key');
return Uint8Array.from(atob(b64), (c) => c.charCodeAt(0));
}
function derLength(length: number): Uint8Array {
if (length < 0x80) return new Uint8Array([length]);
const bytes: number[] = [];
let value = length;
while (value > 0) {
bytes.unshift(value & 0xff);
value >>= 8;
}
return new Uint8Array([0x80 | bytes.length, ...bytes]);
}
function derTagged(tag: number, value: Uint8Array): Uint8Array {
const length = derLength(value.length);
const result = new Uint8Array(1 + length.length + value.length);
result[0] = tag;
result.set(length, 1);
result.set(value, 1 + length.length);
return result;
}
function concatBytes(...parts: Uint8Array[]): Uint8Array {
const length = parts.reduce((sum, part) => sum + part.length, 0);
const result = new Uint8Array(length);
let offset = 0;
for (const part of parts) {
result.set(part, offset);
offset += part.length;
}
return result;
}
function toArrayBuffer(bytes: Uint8Array): ArrayBuffer {
const buffer = new ArrayBuffer(bytes.length);
new Uint8Array(buffer).set(bytes);
return buffer;
}
function pkcs1DerToSpkiDer(pkcs1: Uint8Array): ArrayBuffer {
const rsaEncryptionOid = new Uint8Array([
0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
]);
const nullParams = new Uint8Array([0x05, 0x00]);
const algorithmIdentifier = derTagged(0x30, concatBytes(rsaEncryptionOid, nullParams));
const publicKeyBitString = derTagged(0x03, concatBytes(new Uint8Array([0x00]), pkcs1));
return toArrayBuffer(derTagged(0x30, concatBytes(algorithmIdentifier, publicKeyBitString)));
}
async function importRsaPublicKey(pem: string): Promise<CryptoKey> {
const der = pemToDer(pem);
try {
return await crypto.subtle.importKey(
'spki', toArrayBuffer(der),
{ name: 'RSA-OAEP', hash: 'SHA-256' },
false, ['encrypt'],
);
} catch {
return await crypto.subtle.importKey(
'spki', pkcs1DerToSpkiDer(der),
{ name: 'RSA-OAEP', hash: 'SHA-256' },
false, ['encrypt'],
);
}
}
function bytesToBase64(bytes: Uint8Array): string {
let binary = '';
const chunkSize = 0x8000;
for (let i = 0; i < bytes.length; i += chunkSize) {
binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
}
return btoa(binary);
}
export async function rsaEncrypt(plaintext: string, publicKeyPem: string): Promise<string> {
const key = await importRsaPublicKey(publicKeyPem);
const encoded = new TextEncoder().encode(plaintext);
const encrypted = await crypto.subtle.encrypt({ name: 'RSA-OAEP' }, key, encoded);
return bytesToBase64(new Uint8Array(encrypted));
}
-106
View File
@@ -1,106 +0,0 @@
import { createSignal, Show } from 'solid-js';
import { useNavigate, useLocation } from '@solidjs/router';
import AuthLayout from '@/app/auth/components/AuthLayout';
import { SubmitButton, ErrorMessage } from '@/app/auth/components/FormElements';
import { AuthService } from '@/client';
import { ApiError } from '@/client/core/ApiError';
function ArrowLeft(props: { size: number }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill="currentColor">
<path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" />
</svg>
);
}
function Envelope(props: { size: number; color: string }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill={props.color}>
<path d="M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,27.31V192H40V75.19l84.42,73.87a8,8,0,0,0,10.52.05ZM40,64l88,77,88-77v0H40Z" />
</svg>
);
}
export default function ForgotPassword() {
const navigate = useNavigate();
const location = useLocation();
const [email, setEmail] = createSignal('');
const [error, setError] = createSignal('');
const [loading, setLoading] = createSignal(false);
const isSent = () => location.hash === '#sent';
function setStepSent() { navigate('/forgot-password#sent', { replace: true }); }
function setStepForm() { navigate('/forgot-password', { replace: true }); }
async function handleSubmit(e: SubmitEvent) {
e.preventDefault();
if (loading()) return;
setError('');
if (!email().trim()) { setError('Please enter your email'); return; }
const emailRe = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRe.test(email().trim())) { setError('Invalid email format'); return; }
setLoading(true);
try {
await AuthService.authRequestPasswordReset({ requestBody: { email: email().trim() } });
setStepSent();
} catch (err) {
if (err instanceof ApiError && err.status === 429) {
setError('Too many requests, please try again later');
} else {
setError('Unable to request password reset, please try again');
}
} finally { setLoading(false); }
}
return (
<Show
when={!isSent()}
fallback={
<AuthLayout eyebrow="Reset Password">
<div style={{ display: 'flex', 'flex-direction': 'column', 'align-items': 'center', gap: '16px', 'text-align': 'center' }}>
<div class="status-icon status-icon--accent">
<Envelope size={32} color="var(--accent)" />
</div>
<h1 class="form-header">Email Sent</h1>
<p style={{ 'font-family': 'var(--font-body)', 'font-size': '15px', color: 'var(--fg)', 'line-height': '1.5', margin: '0' }}>
If {email() || 'the email address'} is registered, you will receive a password reset email.
</p>
<p style={{ 'font-family': 'var(--font-body)', 'font-size': '13px', color: 'var(--meta)', 'line-height': '1.45', margin: '0' }}>
Please check your inbox and spam folder. The link is valid for 1 hour.
</p>
<div style={{ display: 'flex', 'flex-direction': 'column', gap: '8px', width: '100%', 'margin-top': '4px' }}>
<a href="/login" style={{ 'text-decoration': 'none' }}>
<button type="button" class="btn-primary btn-block">Back to Sign In</button>
</a>
<button type="button" class="btn-secondary btn-block"
onClick={() => { setStepForm(); setError(''); }}>Change email</button>
</div>
</div>
</AuthLayout>
}
>
<AuthLayout eyebrow="Reset Password">
<form onSubmit={handleSubmit} class="form-stack" noValidate>
<h1 class="form-header">Forgot Password</h1>
<p class="form-desc">Enter your registered email to receive a password reset link.</p>
{error() && <ErrorMessage>{error()}</ErrorMessage>}
<div class="field">
<label for="email-input">Email</label>
<input id="email-input" type="email" autocomplete="email" placeholder="your@email.com"
value={email()} onInput={(e) => setEmail(e.currentTarget.value)} autofocus />
</div>
<SubmitButton loading={loading()} loadingText="Sending…">Send Reset Link</SubmitButton>
<div style={{ display: 'flex', 'justify-content': 'center' }}>
<a href="/login" class="back-link"><ArrowLeft size={14} /> Back to Sign In</a>
</div>
</form>
</AuthLayout>
</Show>
);
}
-192
View File
@@ -1,192 +0,0 @@
import { createSignal, Show } from 'solid-js';
import { useNavigate, useSearchParams } from '@solidjs/router';
import AuthLayout from '@/app/auth/components/AuthLayout';
import { PasswordField, SubmitButton, ErrorMessage } from '@/app/auth/components/FormElements';
import { CaptchaBox } from '@/app/auth/components/CaptchaBox';
import { PinCodeInput } from '@/app/auth/components/PinCodeInput';
import { useCaptcha } from '@/app/auth/hooks/useCaptcha';
import { PASSWORD_MAX_LENGTH } from '@/app/auth/lib/password';
import { rsaEncrypt } from '@/app/auth/lib/rsa';
import { AuthService, type LoginParams } from '@/client';
import { ApiError } from '@/client/core/ApiError';
const ERROR_ID = 'login-error';
function isSafeLocalRedirect(value: string): boolean {
return value.startsWith('/') && !value.startsWith('//') && !value.includes('\\');
}
export default function Login() {
const navigate = useNavigate();
const [searchParams] = useSearchParams();
const {
captcha, captchaError, captchaLoading, refresh: refreshCaptcha,
} = useCaptcha();
const [loginValue, setLoginValue] = createSignal('');
const [password, setPassword] = createSignal('');
const [captchaText, setCaptchaText] = createSignal('');
const [totpCode, setTotpCode] = createSignal('');
const [show2FA, setShow2FA] = createSignal(false);
const [error, setError] = createSignal('');
const [loading, setLoading] = createSignal(false);
function handleCaptchaRefresh() {
setCaptchaText('');
void refreshCaptcha();
}
function getRedirectTo(): string {
const r = searchParams.redirect;
if (typeof r === 'string' && isSafeLocalRedirect(r)) return r;
return '/';
}
async function submitLogin(totpOverride?: string) {
if (loading()) return;
setError('');
const totp = (totpOverride ?? totpCode()).trim();
if (!loginValue().trim()) { setError('Please enter your username or email'); return; }
if (!password()) { setError('Please enter your password'); return; }
if (password().length > PASSWORD_MAX_LENGTH) { setError('Password is too long'); return; }
if (show2FA() && !/^\d{6}$/.test(totp)) {
setError('Please enter a valid 6-digit 2FA code');
return;
}
if (!show2FA()) {
if (captchaLoading()) { setError('Captcha is still loading'); return; }
if (captchaError()) { setError(captchaError()); return; }
if (!captchaText().trim()) { setError('Please enter the captcha'); return; }
}
setLoading(true);
try {
let rsaKey = captcha().rsaKey;
if (!rsaKey) {
const rsaRes = await AuthService.authGetRsaPublicKey();
rsaKey = rsaRes.data.public_key;
}
const encrypted = await rsaEncrypt(password(), rsaKey);
const body: LoginParams = {
username: loginValue().trim(),
password: encrypted,
captcha: show2FA() ? '' : captchaText().trim(),
};
if (show2FA()) body.totp_code = totp;
await AuthService.authLogin({ requestBody: body });
navigate(getRedirectTo(), { replace: true });
} catch (err) {
if (err instanceof ApiError) {
const msg = String(err.body?.error ?? err.message ?? '').toLowerCase();
if (msg.includes('two-factor') || msg.includes('2fa') || msg.includes('totp')) {
setShow2FA(true);
setTotpCode('');
setError('Please enter your 2FA code');
} else if (msg.includes('captcha')) {
setError('Invalid captcha, please try again');
handleCaptchaRefresh();
} else if (err.status === 404 || err.status === 400) {
setError('Invalid username, password, or verification code');
} else if (err.status === 429) {
setError('Too many attempts, please try again later');
} else {
setError('Login failed, please try again');
}
} else {
setError('Unable to complete login, please try again');
}
} finally {
setLoading(false);
}
}
function handleSubmit(e: SubmitEvent) {
e.preventDefault();
void submitLogin();
}
function handleTotpComplete(code: string) {
if (!loading()) void submitLogin(code);
}
return (
<AuthLayout eyebrow="Sign in to your account">
<form onSubmit={handleSubmit} class="form-stack" noValidate>
<h1 class="form-header">Sign In</h1>
{(error() || (!show2FA() && captchaError())) && (
<ErrorMessage id={ERROR_ID}>{error() || captchaError()}</ErrorMessage>
)}
<div class="field">
<label for="login-input">Username or Email</label>
<input
id="login-input"
type="text"
autocomplete="username"
placeholder="Enter your username or email"
value={loginValue()}
onInput={(e) => setLoginValue(e.currentTarget.value)}
autofocus
/>
</div>
<PasswordField
id="password-input"
label="Password"
value={password()}
onChange={setPassword}
autoComplete="current-password"
hasError={!!error()}
describedBy={error() ? ERROR_ID : undefined}
/>
<Show when={show2FA()}>
<PinCodeInput
id="totp-input"
label="Two-Factor Code"
value={totpCode()}
onChange={setTotpCode}
onComplete={handleTotpComplete}
disabled={loading()}
autofocus
/>
</Show>
<Show when={!show2FA()}>
<CaptchaBox
id="login-captcha"
image={captcha().image}
value={captchaText()}
onChange={setCaptchaText}
onRefresh={handleCaptchaRefresh}
/>
</Show>
<div class="forgot-link-row">
<a href="/forgot-password" class="back-link" style={{ color: 'var(--accent)' }}>
Forgot password?
</a>
</div>
<SubmitButton
loading={loading()}
loadingText="Signing in…"
disabled={!show2FA() && (captchaLoading() || !!captchaError())}
>
Sign In
</SubmitButton>
<div class="auth-divider"><span>or</span></div>
<a href="/register" style={{ 'text-decoration': 'none' }}>
<button type="button" class="btn-secondary btn-block">Create an account</button>
</a>
</form>
</AuthLayout>
);
}
-262
View File
@@ -1,262 +0,0 @@
import { createSignal } from 'solid-js';
import { useNavigate, useSearchParams } from '@solidjs/router';
import AuthLayout from '@/app/auth/components/AuthLayout';
import { PasswordField, SubmitButton, ErrorMessage, meetsPasswordPolicy } from '@/app/auth/components/FormElements';
import { CaptchaBox } from '@/app/auth/components/CaptchaBox';
import { useCaptcha } from '@/app/auth/hooks/useCaptcha';
import { PASSWORD_MAX_LENGTH } from '@/app/auth/lib/password';
import { rsaEncrypt } from '@/app/auth/lib/rsa';
import { AuthService, type RegisterEmailCodeParams, type RegisterParams } from '@/client';
import { ApiError } from '@/client/core/ApiError';
const ERROR_ID = 'register-error';
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
function isSafeLocalRedirect(value: string): boolean {
return value.startsWith('/') && !value.startsWith('//') && !value.includes('\\');
}
export default function Register() {
const navigate = useNavigate();
const {
captcha, captchaError, captchaLoading, refresh: refreshCaptcha,
} = useCaptcha();
const [form, setForm] = createSignal({
username: '', email: '', password: '', confirmPassword: '', emailCode: '',
});
const [captchaText, setCaptchaText] = createSignal('');
const [step, setStep] = createSignal<'email' | 'register'>('email');
const [error, setError] = createSignal('');
const [loading, setLoading] = createSignal(false);
const [codeLoading, setCodeLoading] = createSignal(false);
const [searchParams] = useSearchParams();
function getRedirectTo(): string {
const r = searchParams.redirect;
if (typeof r === 'string' && isSafeLocalRedirect(r)) return r;
return '/';
}
function setField(key: keyof ReturnType<typeof form>) {
return (e: InputEvent & { currentTarget: HTMLInputElement }) =>
setForm((prev) => ({ ...prev, [key]: e.currentTarget.value }));
}
function handleCaptchaRefresh() {
setCaptchaText('');
void refreshCaptcha();
}
function validateCaptcha(): boolean {
if (captchaLoading()) { setError('Captcha is still loading'); return false; }
if (captchaError()) { setError(captchaError()); return false; }
if (!captchaText().trim()) { setError('Please enter the captcha'); return false; }
return true;
}
async function handleSendCode(e: MouseEvent) {
e.preventDefault();
if (codeLoading()) return;
setError('');
const email = form().email.trim();
if (!email) { setError('Please enter your email'); return; }
if (!EMAIL_RE.test(email)) { setError('Invalid email format'); return; }
if (!validateCaptcha()) return;
setCodeLoading(true);
try {
const requestBody: RegisterEmailCodeParams = { email, captcha: captchaText().trim() };
await AuthService.authSendRegisterEmailCode({ requestBody });
setStep('register');
handleCaptchaRefresh();
} catch (err) {
if (err instanceof ApiError) {
const msg = String(err.body?.error ?? err.message ?? '').toLowerCase();
if (msg.includes('captcha') || err.status === 400) {
setError('Invalid captcha or email, please try again');
handleCaptchaRefresh();
} else if (err.status === 409) {
setError('This email is already used');
} else if (err.status === 429) {
setError('Too many requests, please try again later');
} else {
setError('Failed to send code, please try again');
}
} else {
setError('Unable to send code, please try again');
}
} finally {
setCodeLoading(false);
}
}
async function handleSubmit(e: SubmitEvent) {
e.preventDefault();
if (loading()) return;
setError('');
const f = form();
if (!f.username.trim()) { setError('Please enter a username'); return; }
if (!f.email.trim()) { setError('Please enter your email'); return; }
if (!f.emailCode.trim()) { setError('Please enter the verification code'); return; }
if (!/^\d{6}$/.test(f.emailCode.trim())) { setError('Please enter a valid 6-digit code'); return; }
if (!f.password) { setError('Please enter a password'); return; }
if (f.password.length > PASSWORD_MAX_LENGTH) { setError('Password is too long'); return; }
if (!meetsPasswordPolicy(f.password)) {
setError('Password must be at least 12 characters with 3 of: uppercase, lowercase, digit, special character');
return;
}
if (f.password !== f.confirmPassword) { setError('Passwords do not match'); return; }
if (!EMAIL_RE.test(f.email.trim())) { setError('Invalid email format'); return; }
if (!validateCaptcha()) return;
setLoading(true);
try {
let rsaKey = captcha().rsaKey;
if (!rsaKey) {
const rsaRes = await AuthService.authGetRsaPublicKey();
rsaKey = rsaRes.data.public_key;
}
const encrypted = await rsaEncrypt(f.password, rsaKey);
const requestBody: RegisterParams = {
username: f.username.trim(),
email: f.email.trim(),
password: encrypted,
captcha: captchaText().trim(),
email_code: f.emailCode.trim(),
};
await AuthService.authRegister({ requestBody });
navigate(getRedirectTo(), { replace: true });
} catch (err) {
if (err instanceof ApiError) {
const msg = String(err.body?.error ?? err.message ?? '').toLowerCase();
if (msg.includes('captcha') || err.status === 400) {
setError('Invalid captcha, code, or password. Please try again');
handleCaptchaRefresh();
} else if (err.status === 409) {
setError('Username or email is already taken');
} else if (err.status === 429) {
setError('Too many attempts, please try again later');
} else {
setError('Registration failed, please try again');
}
} else {
setError('Unable to complete registration, please try again');
}
} finally {
setLoading(false);
}
}
if (step() === 'email') {
return (
<AuthLayout eyebrow="Create a new account">
<div class="form-stack" style={{ gap: '20px' }}>
<h1 class="form-header">Register</h1>
<p class="form-desc">Enter your email to receive a verification code.</p>
{(error() || captchaError()) && <ErrorMessage id={ERROR_ID}>{error() || captchaError()}</ErrorMessage>}
<div class="field">
<label for="reg-email">Email</label>
<input id="reg-email" type="email" autocomplete="email" placeholder="your@email.com"
value={form().email} onInput={setField('email')} autofocus />
</div>
<CaptchaBox
id="register-email-captcha"
image={captcha().image}
value={captchaText()}
onChange={setCaptchaText}
onRefresh={handleCaptchaRefresh}
/>
<button
type="button"
class="btn-primary btn-block"
disabled={codeLoading() || captchaLoading() || !!captchaError()}
onClick={handleSendCode}
>
{codeLoading() ? (
<span style={{ display: 'inline-flex', 'align-items': 'center', gap: '8px' }}>
<span class="spinner-sm" /> Sending
</span>
) : 'Send Code'}
</button>
<div class="auth-divider"><span>or</span></div>
<a href="/login" style={{ 'text-decoration': 'none' }}>
<button type="button" class="btn-secondary btn-block">Already have an account? Sign in</button>
</a>
</div>
</AuthLayout>
);
}
return (
<AuthLayout eyebrow="Create a new account" maxWidth={520}>
<form onSubmit={handleSubmit} class="form-stack" noValidate style={{ gap: '14px' }}>
<h1 class="form-header">Register</h1>
{(error() || captchaError()) && <ErrorMessage id={ERROR_ID}>{error() || captchaError()}</ErrorMessage>}
<div class="field">
<label for="reg-email">Email</label>
<input id="reg-email" type="email" autocomplete="email" value={form().email} disabled />
</div>
<div class="field">
<label for="reg-code">Verification Code</label>
<input id="reg-code" type="text" inputmode="numeric" autocomplete="off"
placeholder="Enter 6-digit code" value={form().emailCode}
onInput={setField('emailCode')} autofocus maxlength={6} />
</div>
<div class="field">
<label for="reg-username">Username</label>
<input id="reg-username" type="text" autocomplete="username" placeholder="Choose a username"
value={form().username} onInput={setField('username')} />
</div>
<PasswordField id="password" label="Password" value={form().password}
onChange={(v) => setForm((p) => ({ ...p, password: v }))}
autoComplete="new-password" placeholder="At least 12 characters"
hasError={!!error()} describedBy={error() ? ERROR_ID : undefined} />
<PasswordField id="confirm-password" label="Confirm Password"
value={form().confirmPassword}
onChange={(v) => setForm((p) => ({ ...p, confirmPassword: v }))}
autoComplete="new-password" placeholder="Re-enter your password"
hasError={!!error()} />
<p class="form-hint">
At least 12 characters with 3 of: uppercase, lowercase, digit, special character.
</p>
<CaptchaBox
id="register-final-captcha"
image={captcha().image}
value={captchaText()}
onChange={setCaptchaText}
onRefresh={handleCaptchaRefresh}
/>
<SubmitButton
loading={loading()}
loadingText="Creating account…"
disabled={captchaLoading() || !!captchaError()}
>Register</SubmitButton>
<div class="auth-divider"><span>or</span></div>
<a href="/login" style={{ 'text-decoration': 'none' }}>
<button type="button" class="btn-secondary btn-block">Already have an account? Sign in</button>
</a>
</form>
</AuthLayout>
);
}
-158
View File
@@ -1,158 +0,0 @@
import { createSignal } from 'solid-js';
import { useSearchParams } from '@solidjs/router';
import AuthLayout from '@/app/auth/components/AuthLayout';
import { PasswordField, SubmitButton, ErrorMessage, StrengthMeter, meetsPasswordPolicy } from '@/app/auth/components/FormElements';
import { PASSWORD_MAX_LENGTH } from '@/app/auth/lib/password';
import { rsaEncrypt } from '@/app/auth/lib/rsa';
import { AuthService } from '@/client';
import { ApiError } from '@/client/core/ApiError';
function WarningCircle(props: { size: number; color: string }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill={props.color}>
<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z" />
</svg>
);
}
function CheckCircle(props: { size: number; color: string }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill={props.color}>
<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z" />
</svg>
);
}
function ArrowLeft(props: { size: number }) {
return (
<svg width={props.size} height={props.size} viewBox="0 0 256 256" fill="currentColor">
<path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" />
</svg>
);
}
function InvalidTokenView() {
return (
<AuthLayout eyebrow="Reset Password">
<div style={{ display: 'flex', 'flex-direction': 'column', 'align-items': 'center', gap: '16px', 'text-align': 'center' }}>
<div class="status-icon status-icon--warn">
<WarningCircle size={32} color="var(--warn)" />
</div>
<h1 class="form-header">Invalid Link</h1>
<p class="form-desc">This password reset link is invalid or has expired. Please request a new one.</p>
<a href="/forgot-password" style={{ 'text-decoration': 'none', width: '100%' }}>
<button type="button" class="btn-primary btn-block">Request New Link</button>
</a>
<a href="/login" class="back-link" style={{ 'margin-top': '4px' }}>
<ArrowLeft size={14} /> Back to Sign In
</a>
</div>
</AuthLayout>
);
}
function SuccessView() {
return (
<AuthLayout eyebrow="Reset Password">
<div style={{ display: 'flex', 'flex-direction': 'column', 'align-items': 'center', gap: '16px', 'text-align': 'center' }}>
<div class="status-icon status-icon--success">
<CheckCircle size={32} color="var(--success)" />
</div>
<h1 class="form-header">Password Reset</h1>
<p style={{ 'font-family': 'var(--font-body)', 'font-size': '15px', color: 'var(--fg)', 'line-height': '1.5', margin: '0' }}>
Your password has been successfully reset. Please sign in with your new password.
</p>
<a href="/login" style={{ 'text-decoration': 'none', width: '100%' }}>
<button type="button" class="btn-primary btn-block">Go to Sign In</button>
</a>
</div>
</AuthLayout>
);
}
function ResetFormView(props: { token: string }) {
const [password, setPassword] = createSignal('');
const [confirmPassword, setConfirmPassword] = createSignal('');
const [success, setSuccess] = createSignal(false);
const [error, setError] = createSignal('');
const [loading, setLoading] = createSignal(false);
async function handleSubmit(e: SubmitEvent) {
e.preventDefault();
if (loading()) return;
setError('');
if (!password()) { setError('Please enter a new password'); return; }
if (password().length > PASSWORD_MAX_LENGTH) { setError('Password is too long'); return; }
if (!meetsPasswordPolicy(password())) {
setError('Password must be at least 12 characters with 3 of: uppercase, lowercase, digit, special character');
return;
}
if (password() !== confirmPassword()) { setError('Passwords do not match'); return; }
setLoading(true);
try {
const rsaRes = await AuthService.authGetRsaPublicKey();
const encrypted = await rsaEncrypt(password(), rsaRes.data.public_key);
await AuthService.authVerifyPasswordReset({
requestBody: { token: props.token, password: encrypted },
});
setSuccess(true);
} catch (err) {
if (err instanceof ApiError) {
if (err.status === 400) {
setError('Link is invalid or expired. Please request a new one.');
} else if (err.status === 429) {
setError('Too many attempts, please try again later');
} else {
setError('Reset failed, please try again');
}
} else {
setError('Unable to reset password, please try again');
}
} finally { setLoading(false); }
}
if (success()) return <SuccessView />;
return (
<AuthLayout eyebrow="Set a new password">
<form onSubmit={handleSubmit} class="form-stack" noValidate>
<h1 class="form-header">Reset Password</h1>
<p class="form-desc">Enter your new password.</p>
{error() && <ErrorMessage>{error()}</ErrorMessage>}
<PasswordField id="new-password" label="New Password" value={password()}
onChange={setPassword} autoComplete="new-password" placeholder="At least 12 characters"
autofocus />
<PasswordField id="confirm-password" label="Confirm Password" value={confirmPassword()}
onChange={setConfirmPassword} autoComplete="new-password" placeholder="Re-enter new password" />
<StrengthMeter password={password()} />
<SubmitButton loading={loading()} loadingText="Resetting…">Reset Password</SubmitButton>
<div style={{ display: 'flex', 'justify-content': 'center' }}>
<a href="/login" class="back-link"><ArrowLeft size={14} /> Back to Sign In</a>
</div>
</form>
</AuthLayout>
);
}
export default function ResetPassword() {
const [searchParams] = useSearchParams();
function getToken(): string {
const t = searchParams.token;
if (typeof t === 'string') return t;
return '';
}
const token = getToken();
if (!token) return <InvalidTokenView />;
return <ResetFormView token={token} />;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 155.3"><path d="M163 35S110-4 69 5l-3 1c-6 2-11 5-14 9l-2 3-15 26 26 5c11 7 25 10 38 7l46 9 18-30z" fill="#76b3e1"/><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="27.5" y1="3" x2="152" y2="63.5"><stop offset=".1" stop-color="#76b3e1"/><stop offset=".3" stop-color="#dcf2fd"/><stop offset="1" stop-color="#76b3e1"/></linearGradient><path d="M163 35S110-4 69 5l-3 1c-6 2-11 5-14 9l-2 3-15 26 26 5c11 7 25 10 38 7l46 9 18-30z" opacity=".3" fill="url(#a)"/><path d="M52 35l-4 1c-17 5-22 21-13 35 10 13 31 20 48 15l62-21S92 26 52 35z" fill="#518ac8"/><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="95.8" y1="32.6" x2="74" y2="105.2"><stop offset="0" stop-color="#76b3e1"/><stop offset=".5" stop-color="#4377bb"/><stop offset="1" stop-color="#1f3b77"/></linearGradient><path d="M52 35l-4 1c-17 5-22 21-13 35 10 13 31 20 48 15l62-21S92 26 52 35z" opacity=".3" fill="url(#b)"/><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="18.4" y1="64.2" x2="144.3" y2="149.8"><stop offset="0" stop-color="#315aa9"/><stop offset=".5" stop-color="#518ac8"/><stop offset="1" stop-color="#315aa9"/></linearGradient><path d="M134 80a45 45 0 00-48-15L24 85 4 120l112 19 20-36c4-7 3-15-2-23z" fill="url(#c)"/><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="75.2" y1="74.5" x2="24.4" y2="260.8"><stop offset="0" stop-color="#4377bb"/><stop offset=".5" stop-color="#1a336b"/><stop offset="1" stop-color="#1a336b"/></linearGradient><path d="M114 115a45 45 0 00-48-15L4 120s53 40 94 30l3-1c17-5 23-21 13-34z" fill="url(#d)"/></svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.5 KiB

+327 -6
View File
@@ -18,17 +18,36 @@ export type { AddRepoMemberParams } from './models/AddRepoMemberParams';
export type { AddSshKeyParams } from './models/AddSshKeyParams';
export type { ApiEmptyResponse } from './models/ApiEmptyResponse';
export type { ApiErrorResponse } from './models/ApiErrorResponse';
export type { ApiListResponse_Value } from './models/ApiListResponse_Value';
export type { ApiResponse_AvatarData } from './models/ApiResponse_AvatarData';
export type { ApiResponse_BlameResponse } from './models/ApiResponse_BlameResponse';
export type { ApiResponse_Blob } from './models/ApiResponse_Blob';
export type { ApiResponse_bool } from './models/ApiResponse_bool';
export type { ApiResponse_Branch } from './models/ApiResponse_Branch';
export type { ApiResponse_BranchMergeCheck } from './models/ApiResponse_BranchMergeCheck';
export type { ApiResponse_BranchProtectionRule } from './models/ApiResponse_BranchProtectionRule';
export type { ApiResponse_CaptchaResponse } from './models/ApiResponse_CaptchaResponse';
export type { ApiResponse_Channel } from './models/ApiResponse_Channel';
export type { ApiResponse_ChannelCategory } from './models/ApiResponse_ChannelCategory';
export type { ApiResponse_ChannelDetail } from './models/ApiResponse_ChannelDetail';
export type { ApiResponse_ChannelMember } from './models/ApiResponse_ChannelMember';
export type { ApiResponse_Commit } from './models/ApiResponse_Commit';
export type { ApiResponse_CompareCommitsResponse } from './models/ApiResponse_CompareCommitsResponse';
export type { ApiResponse_ContextMe } from './models/ApiResponse_ContextMe';
export type { ApiResponse_CreateCommitResponse } from './models/ApiResponse_CreateCommitResponse';
export type { ApiResponse_CreateInvitationResponse } from './models/ApiResponse_CreateInvitationResponse';
export type { ApiResponse_CreatePersonalAccessTokenResponse } from './models/ApiResponse_CreatePersonalAccessTokenResponse';
export type { ApiResponse_DiffStats } from './models/ApiResponse_DiffStats';
export type { ApiResponse_EmailResponse } from './models/ApiResponse_EmailResponse';
export type { ApiResponse_Enable2FAResponse } from './models/ApiResponse_Enable2FAResponse';
export type { ApiResponse_Get2FAStatusResponse } from './models/ApiResponse_Get2FAStatusResponse';
export type { ApiResponse_GetDiffResponse } from './models/ApiResponse_GetDiffResponse';
export type { ApiResponse_i64 } from './models/ApiResponse_i64';
export type { ApiResponse_Issue } from './models/ApiResponse_Issue';
export type { ApiResponse_IssueAssignee } from './models/ApiResponse_IssueAssignee';
export type { ApiResponse_IssueComment } from './models/ApiResponse_IssueComment';
export type { ApiResponse_IssueCommentDetail } from './models/ApiResponse_IssueCommentDetail';
export type { ApiResponse_IssueDetail } from './models/ApiResponse_IssueDetail';
export type { ApiResponse_IssueEvent } from './models/ApiResponse_IssueEvent';
export type { ApiResponse_IssueLabel } from './models/ApiResponse_IssueLabel';
export type { ApiResponse_IssueLabelRelation } from './models/ApiResponse_IssueLabelRelation';
@@ -38,6 +57,18 @@ export type { ApiResponse_IssueReaction } from './models/ApiResponse_IssueReacti
export type { ApiResponse_IssueRepoRelation } from './models/ApiResponse_IssueRepoRelation';
export type { ApiResponse_IssueSubscriber } from './models/ApiResponse_IssueSubscriber';
export type { ApiResponse_IssueTemplate } from './models/ApiResponse_IssueTemplate';
export type { ApiResponse_ListBranchesResponse } from './models/ApiResponse_ListBranchesResponse';
export type { ApiResponse_ListCommitsResponse } from './models/ApiResponse_ListCommitsResponse';
export type { ApiResponse_ListMergeConflictsResponse } from './models/ApiResponse_ListMergeConflictsResponse';
export type { ApiResponse_ListTagsResponse } from './models/ApiResponse_ListTagsResponse';
export type { ApiResponse_ListTreeResponse } from './models/ApiResponse_ListTreeResponse';
export type { ApiResponse_MergeResult } from './models/ApiResponse_MergeResult';
export type { ApiResponse_Notification } from './models/ApiResponse_Notification';
export type { ApiResponse_NotificationBlock } from './models/ApiResponse_NotificationBlock';
export type { ApiResponse_NotificationDelivery } from './models/ApiResponse_NotificationDelivery';
export type { ApiResponse_NotificationDetail } from './models/ApiResponse_NotificationDetail';
export type { ApiResponse_NotificationSubscription } from './models/ApiResponse_NotificationSubscription';
export type { ApiResponse_NotificationTemplate } from './models/ApiResponse_NotificationTemplate';
export type { ApiResponse_Option_BranchProtectionRule } from './models/ApiResponse_Option_BranchProtectionRule';
export type { ApiResponse_PrAssignee } from './models/ApiResponse_PrAssignee';
export type { ApiResponse_PrCheckRun } from './models/ApiResponse_PrCheckRun';
@@ -50,9 +81,12 @@ export type { ApiResponse_PrMergeStrategy } from './models/ApiResponse_PrMergeSt
export type { ApiResponse_PrReaction } from './models/ApiResponse_PrReaction';
export type { ApiResponse_PrReview } from './models/ApiResponse_PrReview';
export type { ApiResponse_PrReviewComment } from './models/ApiResponse_PrReviewComment';
export type { ApiResponse_PrReviewDetail } from './models/ApiResponse_PrReviewDetail';
export type { ApiResponse_PrStatus } from './models/ApiResponse_PrStatus';
export type { ApiResponse_PrSubscription } from './models/ApiResponse_PrSubscription';
export type { ApiResponse_PullRequest } from './models/ApiResponse_PullRequest';
export type { ApiResponse_PullRequestDetail } from './models/ApiResponse_PullRequestDetail';
export type { ApiResponse_RebaseResult } from './models/ApiResponse_RebaseResult';
export type { ApiResponse_Regenerate2FABackupCodesResponse } from './models/ApiResponse_Regenerate2FABackupCodesResponse';
export type { ApiResponse_RegisterEmailCodeResponse } from './models/ApiResponse_RegisterEmailCodeResponse';
export type { ApiResponse_RegisterResponse } from './models/ApiResponse_RegisterResponse';
@@ -61,10 +95,15 @@ export type { ApiResponse_RepoBranch } from './models/ApiResponse_RepoBranch';
export type { ApiResponse_RepoCommitComment } from './models/ApiResponse_RepoCommitComment';
export type { ApiResponse_RepoCommitStatus } from './models/ApiResponse_RepoCommitStatus';
export type { ApiResponse_RepoDeployKey } from './models/ApiResponse_RepoDeployKey';
export type { ApiResponse_RepoDetail } from './models/ApiResponse_RepoDetail';
export type { ApiResponse_RepoFork } from './models/ApiResponse_RepoFork';
export type { ApiResponse_RepoInvitation } from './models/ApiResponse_RepoInvitation';
export type { ApiResponse_RepoMember } from './models/ApiResponse_RepoMember';
export type { ApiResponse_RepoRelease } from './models/ApiResponse_RepoRelease';
export type { ApiResponse_Repository } from './models/ApiResponse_Repository';
export type { ApiResponse_RepositoryHealthResponse } from './models/ApiResponse_RepositoryHealthResponse';
export type { ApiResponse_RepositoryMaintenanceResponse } from './models/ApiResponse_RepositoryMaintenanceResponse';
export type { ApiResponse_RepositoryStatistics } from './models/ApiResponse_RepositoryStatistics';
export type { ApiResponse_RepoStar } from './models/ApiResponse_RepoStar';
export type { ApiResponse_RepoStats } from './models/ApiResponse_RepoStats';
export type { ApiResponse_RepoTag } from './models/ApiResponse_RepoTag';
@@ -72,22 +111,31 @@ export type { ApiResponse_RepoWatch } from './models/ApiResponse_RepoWatch';
export type { ApiResponse_RepoWebhook } from './models/ApiResponse_RepoWebhook';
export type { ApiResponse_RsaResponse } from './models/ApiResponse_RsaResponse';
export type { ApiResponse_String } from './models/ApiResponse_String';
export type { ApiResponse_Tag } from './models/ApiResponse_Tag';
export type { ApiResponse_User } from './models/ApiResponse_User';
export type { ApiResponse_UserAppearance } from './models/ApiResponse_UserAppearance';
export type { ApiResponse_UserAvatarResponse } from './models/ApiResponse_UserAvatarResponse';
export type { ApiResponse_UserBlock } from './models/ApiResponse_UserBlock';
export type { ApiResponse_UserDevice } from './models/ApiResponse_UserDevice';
export type { ApiResponse_UserFollow } from './models/ApiResponse_UserFollow';
export type { ApiResponse_UserGpgKey } from './models/ApiResponse_UserGpgKey';
export type { ApiResponse_UserNotifySetting } from './models/ApiResponse_UserNotifySetting';
export type { ApiResponse_UserOAuthInfo } from './models/ApiResponse_UserOAuthInfo';
export type { ApiResponse_UserPersonalAccessTokenInfo } from './models/ApiResponse_UserPersonalAccessTokenInfo';
export type { ApiResponse_UserPresence } from './models/ApiResponse_UserPresence';
export type { ApiResponse_UserProfile } from './models/ApiResponse_UserProfile';
export type { ApiResponse_UserSecurityLog } from './models/ApiResponse_UserSecurityLog';
export type { ApiResponse_UserSessionInfo } from './models/ApiResponse_UserSessionInfo';
export type { ApiResponse_UserSshKey } from './models/ApiResponse_UserSshKey';
export type { ApiResponse_Vec_BranchProtectionRule } from './models/ApiResponse_Vec_BranchProtectionRule';
export type { ApiResponse_Vec_Channel } from './models/ApiResponse_Vec_Channel';
export type { ApiResponse_Vec_ChannelCategory } from './models/ApiResponse_Vec_ChannelCategory';
export type { ApiResponse_Vec_ChannelDetail } from './models/ApiResponse_Vec_ChannelDetail';
export type { ApiResponse_Vec_ChannelMember } from './models/ApiResponse_Vec_ChannelMember';
export type { ApiResponse_Vec_Issue } from './models/ApiResponse_Vec_Issue';
export type { ApiResponse_Vec_IssueAssignee } from './models/ApiResponse_Vec_IssueAssignee';
export type { ApiResponse_Vec_IssueComment } from './models/ApiResponse_Vec_IssueComment';
export type { ApiResponse_Vec_IssueCommentDetail } from './models/ApiResponse_Vec_IssueCommentDetail';
export type { ApiResponse_Vec_IssueDetail } from './models/ApiResponse_Vec_IssueDetail';
export type { ApiResponse_Vec_IssueEvent } from './models/ApiResponse_Vec_IssueEvent';
export type { ApiResponse_Vec_IssueLabel } from './models/ApiResponse_Vec_IssueLabel';
export type { ApiResponse_Vec_IssueLabelRelation } from './models/ApiResponse_Vec_IssueLabelRelation';
@@ -97,6 +145,12 @@ export type { ApiResponse_Vec_IssueReaction } from './models/ApiResponse_Vec_Iss
export type { ApiResponse_Vec_IssueRepoRelation } from './models/ApiResponse_Vec_IssueRepoRelation';
export type { ApiResponse_Vec_IssueSubscriber } from './models/ApiResponse_Vec_IssueSubscriber';
export type { ApiResponse_Vec_IssueTemplate } from './models/ApiResponse_Vec_IssueTemplate';
export type { ApiResponse_Vec_Notification } from './models/ApiResponse_Vec_Notification';
export type { ApiResponse_Vec_NotificationBlock } from './models/ApiResponse_Vec_NotificationBlock';
export type { ApiResponse_Vec_NotificationDelivery } from './models/ApiResponse_Vec_NotificationDelivery';
export type { ApiResponse_Vec_NotificationDetail } from './models/ApiResponse_Vec_NotificationDetail';
export type { ApiResponse_Vec_NotificationSubscription } from './models/ApiResponse_Vec_NotificationSubscription';
export type { ApiResponse_Vec_NotificationTemplate } from './models/ApiResponse_Vec_NotificationTemplate';
export type { ApiResponse_Vec_PrAssignee } from './models/ApiResponse_Vec_PrAssignee';
export type { ApiResponse_Vec_PrCheckRun } from './models/ApiResponse_Vec_PrCheckRun';
export type { ApiResponse_Vec_PrCommit } from './models/ApiResponse_Vec_PrCommit';
@@ -107,13 +161,16 @@ export type { ApiResponse_Vec_PrLabelRelation } from './models/ApiResponse_Vec_P
export type { ApiResponse_Vec_PrReaction } from './models/ApiResponse_Vec_PrReaction';
export type { ApiResponse_Vec_PrReview } from './models/ApiResponse_Vec_PrReview';
export type { ApiResponse_Vec_PrReviewComment } from './models/ApiResponse_Vec_PrReviewComment';
export type { ApiResponse_Vec_PrReviewDetail } from './models/ApiResponse_Vec_PrReviewDetail';
export type { ApiResponse_Vec_PrSubscription } from './models/ApiResponse_Vec_PrSubscription';
export type { ApiResponse_Vec_PullRequest } from './models/ApiResponse_Vec_PullRequest';
export type { ApiResponse_Vec_PullRequestDetail } from './models/ApiResponse_Vec_PullRequestDetail';
export type { ApiResponse_Vec_Repo } from './models/ApiResponse_Vec_Repo';
export type { ApiResponse_Vec_RepoBranch } from './models/ApiResponse_Vec_RepoBranch';
export type { ApiResponse_Vec_RepoCommitComment } from './models/ApiResponse_Vec_RepoCommitComment';
export type { ApiResponse_Vec_RepoCommitStatus } from './models/ApiResponse_Vec_RepoCommitStatus';
export type { ApiResponse_Vec_RepoDeployKey } from './models/ApiResponse_Vec_RepoDeployKey';
export type { ApiResponse_Vec_RepoDetail } from './models/ApiResponse_Vec_RepoDetail';
export type { ApiResponse_Vec_RepoFork } from './models/ApiResponse_Vec_RepoFork';
export type { ApiResponse_Vec_RepoInvitation } from './models/ApiResponse_Vec_RepoInvitation';
export type { ApiResponse_Vec_RepoMember } from './models/ApiResponse_Vec_RepoMember';
@@ -122,7 +179,9 @@ export type { ApiResponse_Vec_RepoStar } from './models/ApiResponse_Vec_RepoStar
export type { ApiResponse_Vec_RepoTag } from './models/ApiResponse_Vec_RepoTag';
export type { ApiResponse_Vec_RepoWatch } from './models/ApiResponse_Vec_RepoWatch';
export type { ApiResponse_Vec_RepoWebhook } from './models/ApiResponse_Vec_RepoWebhook';
export type { ApiResponse_Vec_UserBlock } from './models/ApiResponse_Vec_UserBlock';
export type { ApiResponse_Vec_UserDevice } from './models/ApiResponse_Vec_UserDevice';
export type { ApiResponse_Vec_UserFollow } from './models/ApiResponse_Vec_UserFollow';
export type { ApiResponse_Vec_UserGpgKey } from './models/ApiResponse_Vec_UserGpgKey';
export type { ApiResponse_Vec_UserOAuthInfo } from './models/ApiResponse_Vec_UserOAuthInfo';
export type { ApiResponse_Vec_UserPersonalAccessTokenInfo } from './models/ApiResponse_Vec_UserPersonalAccessTokenInfo';
@@ -133,6 +192,7 @@ export type { ApiResponse_Vec_WikiPage } from './models/ApiResponse_Vec_WikiPage
export type { ApiResponse_Vec_WikiPageRevision } from './models/ApiResponse_Vec_WikiPageRevision';
export type { ApiResponse_Vec_Workspace } from './models/ApiResponse_Vec_Workspace';
export type { ApiResponse_Vec_WorkspaceAuditLog } from './models/ApiResponse_Vec_WorkspaceAuditLog';
export type { ApiResponse_Vec_WorkspaceDetail } from './models/ApiResponse_Vec_WorkspaceDetail';
export type { ApiResponse_Vec_WorkspaceDomain } from './models/ApiResponse_Vec_WorkspaceDomain';
export type { ApiResponse_Vec_WorkspaceIntegration } from './models/ApiResponse_Vec_WorkspaceIntegration';
export type { ApiResponse_Vec_WorkspaceInvitation } from './models/ApiResponse_Vec_WorkspaceInvitation';
@@ -145,6 +205,7 @@ export type { ApiResponse_WikiPageRevision } from './models/ApiResponse_WikiPage
export type { ApiResponse_Workspace } from './models/ApiResponse_Workspace';
export type { ApiResponse_WorkspaceBilling } from './models/ApiResponse_WorkspaceBilling';
export type { ApiResponse_WorkspaceCustomBranding } from './models/ApiResponse_WorkspaceCustomBranding';
export type { ApiResponse_WorkspaceDetail } from './models/ApiResponse_WorkspaceDetail';
export type { ApiResponse_WorkspaceDomain } from './models/ApiResponse_WorkspaceDomain';
export type { ApiResponse_WorkspaceIntegration } from './models/ApiResponse_WorkspaceIntegration';
export type { ApiResponse_WorkspaceInvitation } from './models/ApiResponse_WorkspaceInvitation';
@@ -153,16 +214,45 @@ export type { ApiResponse_WorkspacePendingApproval } from './models/ApiResponse_
export type { ApiResponse_WorkspaceSettings } from './models/ApiResponse_WorkspaceSettings';
export type { ApiResponse_WorkspaceStats } from './models/ApiResponse_WorkspaceStats';
export type { ApiResponse_WorkspaceWebhook } from './models/ApiResponse_WorkspaceWebhook';
export type { AvatarData } from './models/AvatarData';
export type { BlameHunk } from './models/BlameHunk';
export type { BlameLine } from './models/BlameLine';
export type { BlameResponse } from './models/BlameResponse';
export type { Blob } from './models/Blob';
export type { BlockBody } from './models/BlockBody';
export type { Branch } from './models/Branch';
export type { BranchMergeCheck } from './models/BranchMergeCheck';
export type { BranchProtectionRule } from './models/BranchProtectionRule';
export type { BranchUpstream } from './models/BranchUpstream';
export type { CaptchaQuery } from './models/CaptchaQuery';
export type { CaptchaResponse } from './models/CaptchaResponse';
export type { ChangePasswordParams } from './models/ChangePasswordParams';
export type { Channel } from './models/Channel';
export type { ChannelBaseInfo } from './models/ChannelBaseInfo';
export type { ChannelCategory } from './models/ChannelCategory';
export type { ChannelDetail } from './models/ChannelDetail';
export type { ChannelKind } from './models/ChannelKind';
export type { ChannelListFilters } from './models/ChannelListFilters';
export type { ChannelMember } from './models/ChannelMember';
export type { ChannelType } from './models/ChannelType';
export type { CherryPickParams } from './models/CherryPickParams';
export type { ColorScheme } from './models/ColorScheme';
export type { Commit } from './models/Commit';
export type { CommitAction } from './models/CommitAction';
export type { CommitStats } from './models/CommitStats';
export type { CommitTrailer } from './models/CommitTrailer';
export type { CompareCommitsResponse } from './models/CompareCommitsResponse';
export type { ContextMe } from './models/ContextMe';
export type { CreateBlockParams } from './models/CreateBlockParams';
export type { CreateBranchBody } from './models/CreateBranchBody';
export type { CreateBranchParams } from './models/CreateBranchParams';
export type { CreateCategoryParams } from './models/CreateCategoryParams';
export type { CreateChannelParams } from './models/CreateChannelParams';
export type { CreateCheckRunParams } from './models/CreateCheckRunParams';
export type { CreateCommentParams } from './models/CreateCommentParams';
export type { CreateCommitCommentParams } from './models/CreateCommitCommentParams';
export type { CreateCommitParams } from './models/CreateCommitParams';
export type { CreateCommitResponse } from './models/CreateCommitResponse';
export type { CreateCommitStatusParams } from './models/CreateCommitStatusParams';
export type { CreateIntegrationParams } from './models/CreateIntegrationParams';
export type { CreateInvitationParams } from './models/CreateInvitationParams';
@@ -171,6 +261,7 @@ export type { CreateIssueParams } from './models/CreateIssueParams';
export type { CreateIssueReactionParams } from './models/CreateIssueReactionParams';
export type { CreateLabelParams } from './models/CreateLabelParams';
export type { CreateMilestoneParams } from './models/CreateMilestoneParams';
export type { CreatePersonalAccessTokenResponse } from './models/CreatePersonalAccessTokenResponse';
export type { CreatePrLabelParams } from './models/CreatePrLabelParams';
export type { CreateProtectionRuleParams } from './models/CreateProtectionRuleParams';
export type { CreatePrParams } from './models/CreatePrParams';
@@ -179,13 +270,21 @@ export type { CreateReleaseParams } from './models/CreateReleaseParams';
export type { CreateRepoInvitationParams } from './models/CreateRepoInvitationParams';
export type { CreateRepoParams } from './models/CreateRepoParams';
export type { CreateReviewParams } from './models/CreateReviewParams';
export type { CreateSubscriptionParams } from './models/CreateSubscriptionParams';
export type { CreateTagBody } from './models/CreateTagBody';
export type { CreateTagParams } from './models/CreateTagParams';
export type { CreateTemplateParams } from './models/CreateTemplateParams';
export type { CreateTokenBody } from './models/CreateTokenBody';
export type { CreateWebhookParams } from './models/CreateWebhookParams';
export type { CreateWikiPageParams } from './models/CreateWikiPageParams';
export type { CreateWorkspaceParams } from './models/CreateWorkspaceParams';
export type { DeliveryChannel } from './models/DeliveryChannel';
export type { Density } from './models/Density';
export type { DeviceType } from './models/DeviceType';
export type { DiffFile } from './models/DiffFile';
export type { DiffHunk } from './models/DiffHunk';
export type { DiffLine } from './models/DiffLine';
export type { DiffStats } from './models/DiffStats';
export type { DigestFrequency } from './models/DigestFrequency';
export type { Disable2FAParams } from './models/Disable2FAParams';
export type { DismissReviewParams } from './models/DismissReviewParams';
@@ -196,11 +295,19 @@ export type { Enable2FAResponse } from './models/Enable2FAResponse';
export type { EventType } from './models/EventType';
export type { FontSize } from './models/FontSize';
export type { ForkRepoParams } from './models/ForkRepoParams';
export type { ForumLayout } from './models/ForumLayout';
export type { ForumSortOrder } from './models/ForumSortOrder';
export type { Get2FAStatusResponse } from './models/Get2FAStatusResponse';
export type { GetDiffResponse } from './models/GetDiffResponse';
export type { GitService } from './models/GitService';
export type { Identity } from './models/Identity';
export type { InviteMemberParams } from './models/InviteMemberParams';
export type { Issue } from './models/Issue';
export type { IssueAssignee } from './models/IssueAssignee';
export type { IssueBaseInfo } from './models/IssueBaseInfo';
export type { IssueComment } from './models/IssueComment';
export type { IssueCommentDetail } from './models/IssueCommentDetail';
export type { IssueDetail } from './models/IssueDetail';
export type { IssueEvent } from './models/IssueEvent';
export type { IssueLabel } from './models/IssueLabel';
export type { IssueLabelRelation } from './models/IssueLabelRelation';
@@ -214,17 +321,36 @@ export type { IssueTemplate } from './models/IssueTemplate';
export type { KeyType } from './models/KeyType';
export type { LinkPrParams } from './models/LinkPrParams';
export type { LinkRepoParams } from './models/LinkRepoParams';
export type { ListBranchesResponse } from './models/ListBranchesResponse';
export type { ListCommitsResponse } from './models/ListCommitsResponse';
export type { ListMergeConflictsResponse } from './models/ListMergeConflictsResponse';
export type { ListTagsResponse } from './models/ListTagsResponse';
export type { ListTreeResponse } from './models/ListTreeResponse';
export type { LockIssueParams } from './models/LockIssueParams';
export type { LockPrParams } from './models/LockPrParams';
export type { LoginParams } from './models/LoginParams';
export type { MergeConflict } from './models/MergeConflict';
export type { MergeConflictSection } from './models/MergeConflictSection';
export type { MergeParams } from './models/MergeParams';
export type { MergePrParams } from './models/MergePrParams';
export type { MergeResult } from './models/MergeResult';
export type { MergeStrategyKind } from './models/MergeStrategyKind';
export type { MuteIssueParams } from './models/MuteIssueParams';
export type { MutePrParams } from './models/MutePrParams';
export type { Notification } from './models/Notification';
export type { NotificationBlock } from './models/NotificationBlock';
export type { NotificationDelivery } from './models/NotificationDelivery';
export type { NotificationDetail } from './models/NotificationDetail';
export type { NotificationSubscription } from './models/NotificationSubscription';
export type { NotificationTemplate } from './models/NotificationTemplate';
export type { NotificationType } from './models/NotificationType';
export type { Oid } from './models/Oid';
export type { PageInfo } from './models/PageInfo';
export type { Permission } from './models/Permission';
export type { PrAssignee } from './models/PrAssignee';
export type { PrCheckRun } from './models/PrCheckRun';
export type { PrCommit } from './models/PrCommit';
export type { PresenceStatus } from './models/PresenceStatus';
export type { PrEvent } from './models/PrEvent';
export type { PrFile } from './models/PrFile';
export type { Priority } from './models/Priority';
@@ -236,9 +362,15 @@ export type { Provider } from './models/Provider';
export type { PrReaction } from './models/PrReaction';
export type { PrReview } from './models/PrReview';
export type { PrReviewComment } from './models/PrReviewComment';
export type { PrReviewDetail } from './models/PrReviewDetail';
export type { PrStatus } from './models/PrStatus';
export type { PrSubscription } from './models/PrSubscription';
export type { PullRequest } from './models/PullRequest';
export type { PullRequestBaseInfo } from './models/PullRequestBaseInfo';
export type { PullRequestDetail } from './models/PullRequestDetail';
export type { RebaseParams } from './models/RebaseParams';
export type { RebaseResult } from './models/RebaseResult';
export type { RecentCommit } from './models/RecentCommit';
export type { Regenerate2FABackupCodesRequest } from './models/Regenerate2FABackupCodesRequest';
export type { Regenerate2FABackupCodesResponse } from './models/Regenerate2FABackupCodesResponse';
export type { RegisterEmailCodeParams } from './models/RegisterEmailCodeParams';
@@ -247,14 +379,21 @@ export type { RegisterParams } from './models/RegisterParams';
export type { RegisterResponse } from './models/RegisterResponse';
export type { RelationType } from './models/RelationType';
export type { Repo } from './models/Repo';
export type { RepoBaseInfo } from './models/RepoBaseInfo';
export type { RepoBranch } from './models/RepoBranch';
export type { RepoCommitComment } from './models/RepoCommitComment';
export type { RepoCommitStatus } from './models/RepoCommitStatus';
export type { RepoDeployKey } from './models/RepoDeployKey';
export type { RepoDetail } from './models/RepoDetail';
export type { RepoFork } from './models/RepoFork';
export type { RepoInvitation } from './models/RepoInvitation';
export type { RepoMember } from './models/RepoMember';
export type { RepoRelease } from './models/RepoRelease';
export type { Repository } from './models/Repository';
export type { RepositoryHeader } from './models/RepositoryHeader';
export type { RepositoryHealthResponse } from './models/RepositoryHealthResponse';
export type { RepositoryMaintenanceResponse } from './models/RepositoryMaintenanceResponse';
export type { RepositoryStatistics } from './models/RepositoryStatistics';
export type { RepoStar } from './models/RepoStar';
export type { RepoStats } from './models/RepoStats';
export type { RepoTag } from './models/RepoTag';
@@ -264,37 +403,51 @@ export type { RequestApprovalParams } from './models/RequestApprovalParams';
export type { RequestType } from './models/RequestType';
export type { ResetPasswordRequest } from './models/ResetPasswordRequest';
export type { ResetPasswordVerifyParams } from './models/ResetPasswordVerifyParams';
export type { RevertParams } from './models/RevertParams';
export type { ReviewApprovalRequest } from './models/ReviewApprovalRequest';
export type { ReviewCommentParams } from './models/ReviewCommentParams';
export type { Role } from './models/Role';
export type { RsaResponse } from './models/RsaResponse';
export type { Scope } from './models/Scope';
export type { SetBranchProtectionParams } from './models/SetBranchProtectionParams';
export type { Signature } from './models/Signature';
export type { State } from './models/State';
export type { Status } from './models/Status';
export type { SubmitReviewParams } from './models/SubmitReviewParams';
export type { SubscriptionLevel } from './models/SubscriptionLevel';
export type { Tag } from './models/Tag';
export type { TargetType } from './models/TargetType';
export type { Theme } from './models/Theme';
export type { Timestamp } from './models/Timestamp';
export type { TransferIssueParams } from './models/TransferIssueParams';
export type { TransferOwnerParams } from './models/TransferOwnerParams';
export type { TransferOwnerRequest } from './models/TransferOwnerRequest';
export type { TreeEntry } from './models/TreeEntry';
export type { UpdateBillingParams } from './models/UpdateBillingParams';
export type { UpdateBrandingParams } from './models/UpdateBrandingParams';
export type { UpdateCategoryParams } from './models/UpdateCategoryParams';
export type { UpdateChannelParams } from './models/UpdateChannelParams';
export type { UpdateCheckRunParams } from './models/UpdateCheckRunParams';
export type { UpdateCommentParams } from './models/UpdateCommentParams';
export type { UpdateCommitCommentParams } from './models/UpdateCommitCommentParams';
export type { UpdateDomainParams } from './models/UpdateDomainParams';
export type { UpdateIntegrationParams } from './models/UpdateIntegrationParams';
export type { UpdateIssueParams } from './models/UpdateIssueParams';
export type { UpdateLabelParams } from './models/UpdateLabelParams';
export type { UpdateMemberParams } from './models/UpdateMemberParams';
export type { UpdateMemberRoleParams } from './models/UpdateMemberRoleParams';
export type { UpdateMergeStrategyParams } from './models/UpdateMergeStrategyParams';
export type { UpdateMilestoneParams } from './models/UpdateMilestoneParams';
export type { UpdatePresenceBody } from './models/UpdatePresenceBody';
export type { UpdatePrLabelParams } from './models/UpdatePrLabelParams';
export type { UpdateProtectionRuleParams } from './models/UpdateProtectionRuleParams';
export type { UpdatePrParams } from './models/UpdatePrParams';
export type { UpdateReleaseParams } from './models/UpdateReleaseParams';
export type { UpdateRepoMemberRoleParams } from './models/UpdateRepoMemberRoleParams';
export type { UpdateRepoParams } from './models/UpdateRepoParams';
export type { UpdateSubscriptionParams } from './models/UpdateSubscriptionParams';
export type { UpdateTagBody } from './models/UpdateTagBody';
export type { UpdateTagParams } from './models/UpdateTagParams';
export type { UpdateTemplateParams } from './models/UpdateTemplateParams';
export type { UpdateUserAccountParams } from './models/UpdateUserAccountParams';
export type { UpdateUserAppearanceParams } from './models/UpdateUserAppearanceParams';
@@ -304,30 +457,36 @@ export type { UpdateWebhookParams } from './models/UpdateWebhookParams';
export type { UpdateWikiPageParams } from './models/UpdateWikiPageParams';
export type { UpdateWorkspaceParams } from './models/UpdateWorkspaceParams';
export type { UpdateWorkspaceSettingsParams } from './models/UpdateWorkspaceSettingsParams';
export type { UploadUserAvatarParams } from './models/UploadUserAvatarParams';
export type { User } from './models/User';
export type { UserAppearance } from './models/UserAppearance';
export type { UserAvatarResponse } from './models/UserAvatarResponse';
export type { UserBaseInfo } from './models/UserBaseInfo';
export type { UserBlock } from './models/UserBlock';
export type { UserDevice } from './models/UserDevice';
export type { UserFollow } from './models/UserFollow';
export type { UserGpgKey } from './models/UserGpgKey';
export type { UserNotifySetting } from './models/UserNotifySetting';
export type { UserOAuthInfo } from './models/UserOAuthInfo';
export type { UserPersonalAccessTokenInfo } from './models/UserPersonalAccessTokenInfo';
export type { UserPresence } from './models/UserPresence';
export type { UserProfile } from './models/UserProfile';
export type { UserSecurityLog } from './models/UserSecurityLog';
export type { UserSessionInfo } from './models/UserSessionInfo';
export type { UserSshKey } from './models/UserSshKey';
export type { Value } from './models/Value';
export type { VerifiedSignature } from './models/VerifiedSignature';
export type { Verify2FAParams } from './models/Verify2FAParams';
export type { Visibility } from './models/Visibility';
export type { WatchParams } from './models/WatchParams';
export type { WikiCompareResult } from './models/WikiCompareResult';
export type { WikiPage } from './models/WikiPage';
export type { WikiPageBaseInfo } from './models/WikiPageBaseInfo';
export type { WikiPageRevision } from './models/WikiPageRevision';
export type { Workspace } from './models/Workspace';
export type { WorkspaceAuditLog } from './models/WorkspaceAuditLog';
export type { WorkspaceBaseInfo } from './models/WorkspaceBaseInfo';
export type { WorkspaceBilling } from './models/WorkspaceBilling';
export type { WorkspaceCustomBranding } from './models/WorkspaceCustomBranding';
export type { WorkspaceDetail } from './models/WorkspaceDetail';
export type { WorkspaceDomain } from './models/WorkspaceDomain';
export type { WorkspaceIntegration } from './models/WorkspaceIntegration';
export type { WorkspaceIntegrationConfig } from './models/WorkspaceIntegrationConfig';
@@ -349,17 +508,36 @@ export { $AddRepoMemberParams } from './schemas/$AddRepoMemberParams';
export { $AddSshKeyParams } from './schemas/$AddSshKeyParams';
export { $ApiEmptyResponse } from './schemas/$ApiEmptyResponse';
export { $ApiErrorResponse } from './schemas/$ApiErrorResponse';
export { $ApiListResponse_Value } from './schemas/$ApiListResponse_Value';
export { $ApiResponse_AvatarData } from './schemas/$ApiResponse_AvatarData';
export { $ApiResponse_BlameResponse } from './schemas/$ApiResponse_BlameResponse';
export { $ApiResponse_Blob } from './schemas/$ApiResponse_Blob';
export { $ApiResponse_bool } from './schemas/$ApiResponse_bool';
export { $ApiResponse_Branch } from './schemas/$ApiResponse_Branch';
export { $ApiResponse_BranchMergeCheck } from './schemas/$ApiResponse_BranchMergeCheck';
export { $ApiResponse_BranchProtectionRule } from './schemas/$ApiResponse_BranchProtectionRule';
export { $ApiResponse_CaptchaResponse } from './schemas/$ApiResponse_CaptchaResponse';
export { $ApiResponse_Channel } from './schemas/$ApiResponse_Channel';
export { $ApiResponse_ChannelCategory } from './schemas/$ApiResponse_ChannelCategory';
export { $ApiResponse_ChannelDetail } from './schemas/$ApiResponse_ChannelDetail';
export { $ApiResponse_ChannelMember } from './schemas/$ApiResponse_ChannelMember';
export { $ApiResponse_Commit } from './schemas/$ApiResponse_Commit';
export { $ApiResponse_CompareCommitsResponse } from './schemas/$ApiResponse_CompareCommitsResponse';
export { $ApiResponse_ContextMe } from './schemas/$ApiResponse_ContextMe';
export { $ApiResponse_CreateCommitResponse } from './schemas/$ApiResponse_CreateCommitResponse';
export { $ApiResponse_CreateInvitationResponse } from './schemas/$ApiResponse_CreateInvitationResponse';
export { $ApiResponse_CreatePersonalAccessTokenResponse } from './schemas/$ApiResponse_CreatePersonalAccessTokenResponse';
export { $ApiResponse_DiffStats } from './schemas/$ApiResponse_DiffStats';
export { $ApiResponse_EmailResponse } from './schemas/$ApiResponse_EmailResponse';
export { $ApiResponse_Enable2FAResponse } from './schemas/$ApiResponse_Enable2FAResponse';
export { $ApiResponse_Get2FAStatusResponse } from './schemas/$ApiResponse_Get2FAStatusResponse';
export { $ApiResponse_GetDiffResponse } from './schemas/$ApiResponse_GetDiffResponse';
export { $ApiResponse_i64 } from './schemas/$ApiResponse_i64';
export { $ApiResponse_Issue } from './schemas/$ApiResponse_Issue';
export { $ApiResponse_IssueAssignee } from './schemas/$ApiResponse_IssueAssignee';
export { $ApiResponse_IssueComment } from './schemas/$ApiResponse_IssueComment';
export { $ApiResponse_IssueCommentDetail } from './schemas/$ApiResponse_IssueCommentDetail';
export { $ApiResponse_IssueDetail } from './schemas/$ApiResponse_IssueDetail';
export { $ApiResponse_IssueEvent } from './schemas/$ApiResponse_IssueEvent';
export { $ApiResponse_IssueLabel } from './schemas/$ApiResponse_IssueLabel';
export { $ApiResponse_IssueLabelRelation } from './schemas/$ApiResponse_IssueLabelRelation';
@@ -369,6 +547,18 @@ export { $ApiResponse_IssueReaction } from './schemas/$ApiResponse_IssueReaction
export { $ApiResponse_IssueRepoRelation } from './schemas/$ApiResponse_IssueRepoRelation';
export { $ApiResponse_IssueSubscriber } from './schemas/$ApiResponse_IssueSubscriber';
export { $ApiResponse_IssueTemplate } from './schemas/$ApiResponse_IssueTemplate';
export { $ApiResponse_ListBranchesResponse } from './schemas/$ApiResponse_ListBranchesResponse';
export { $ApiResponse_ListCommitsResponse } from './schemas/$ApiResponse_ListCommitsResponse';
export { $ApiResponse_ListMergeConflictsResponse } from './schemas/$ApiResponse_ListMergeConflictsResponse';
export { $ApiResponse_ListTagsResponse } from './schemas/$ApiResponse_ListTagsResponse';
export { $ApiResponse_ListTreeResponse } from './schemas/$ApiResponse_ListTreeResponse';
export { $ApiResponse_MergeResult } from './schemas/$ApiResponse_MergeResult';
export { $ApiResponse_Notification } from './schemas/$ApiResponse_Notification';
export { $ApiResponse_NotificationBlock } from './schemas/$ApiResponse_NotificationBlock';
export { $ApiResponse_NotificationDelivery } from './schemas/$ApiResponse_NotificationDelivery';
export { $ApiResponse_NotificationDetail } from './schemas/$ApiResponse_NotificationDetail';
export { $ApiResponse_NotificationSubscription } from './schemas/$ApiResponse_NotificationSubscription';
export { $ApiResponse_NotificationTemplate } from './schemas/$ApiResponse_NotificationTemplate';
export { $ApiResponse_Option_BranchProtectionRule } from './schemas/$ApiResponse_Option_BranchProtectionRule';
export { $ApiResponse_PrAssignee } from './schemas/$ApiResponse_PrAssignee';
export { $ApiResponse_PrCheckRun } from './schemas/$ApiResponse_PrCheckRun';
@@ -381,9 +571,12 @@ export { $ApiResponse_PrMergeStrategy } from './schemas/$ApiResponse_PrMergeStra
export { $ApiResponse_PrReaction } from './schemas/$ApiResponse_PrReaction';
export { $ApiResponse_PrReview } from './schemas/$ApiResponse_PrReview';
export { $ApiResponse_PrReviewComment } from './schemas/$ApiResponse_PrReviewComment';
export { $ApiResponse_PrReviewDetail } from './schemas/$ApiResponse_PrReviewDetail';
export { $ApiResponse_PrStatus } from './schemas/$ApiResponse_PrStatus';
export { $ApiResponse_PrSubscription } from './schemas/$ApiResponse_PrSubscription';
export { $ApiResponse_PullRequest } from './schemas/$ApiResponse_PullRequest';
export { $ApiResponse_PullRequestDetail } from './schemas/$ApiResponse_PullRequestDetail';
export { $ApiResponse_RebaseResult } from './schemas/$ApiResponse_RebaseResult';
export { $ApiResponse_Regenerate2FABackupCodesResponse } from './schemas/$ApiResponse_Regenerate2FABackupCodesResponse';
export { $ApiResponse_RegisterEmailCodeResponse } from './schemas/$ApiResponse_RegisterEmailCodeResponse';
export { $ApiResponse_RegisterResponse } from './schemas/$ApiResponse_RegisterResponse';
@@ -392,10 +585,15 @@ export { $ApiResponse_RepoBranch } from './schemas/$ApiResponse_RepoBranch';
export { $ApiResponse_RepoCommitComment } from './schemas/$ApiResponse_RepoCommitComment';
export { $ApiResponse_RepoCommitStatus } from './schemas/$ApiResponse_RepoCommitStatus';
export { $ApiResponse_RepoDeployKey } from './schemas/$ApiResponse_RepoDeployKey';
export { $ApiResponse_RepoDetail } from './schemas/$ApiResponse_RepoDetail';
export { $ApiResponse_RepoFork } from './schemas/$ApiResponse_RepoFork';
export { $ApiResponse_RepoInvitation } from './schemas/$ApiResponse_RepoInvitation';
export { $ApiResponse_RepoMember } from './schemas/$ApiResponse_RepoMember';
export { $ApiResponse_RepoRelease } from './schemas/$ApiResponse_RepoRelease';
export { $ApiResponse_Repository } from './schemas/$ApiResponse_Repository';
export { $ApiResponse_RepositoryHealthResponse } from './schemas/$ApiResponse_RepositoryHealthResponse';
export { $ApiResponse_RepositoryMaintenanceResponse } from './schemas/$ApiResponse_RepositoryMaintenanceResponse';
export { $ApiResponse_RepositoryStatistics } from './schemas/$ApiResponse_RepositoryStatistics';
export { $ApiResponse_RepoStar } from './schemas/$ApiResponse_RepoStar';
export { $ApiResponse_RepoStats } from './schemas/$ApiResponse_RepoStats';
export { $ApiResponse_RepoTag } from './schemas/$ApiResponse_RepoTag';
@@ -403,22 +601,31 @@ export { $ApiResponse_RepoWatch } from './schemas/$ApiResponse_RepoWatch';
export { $ApiResponse_RepoWebhook } from './schemas/$ApiResponse_RepoWebhook';
export { $ApiResponse_RsaResponse } from './schemas/$ApiResponse_RsaResponse';
export { $ApiResponse_String } from './schemas/$ApiResponse_String';
export { $ApiResponse_Tag } from './schemas/$ApiResponse_Tag';
export { $ApiResponse_User } from './schemas/$ApiResponse_User';
export { $ApiResponse_UserAppearance } from './schemas/$ApiResponse_UserAppearance';
export { $ApiResponse_UserAvatarResponse } from './schemas/$ApiResponse_UserAvatarResponse';
export { $ApiResponse_UserBlock } from './schemas/$ApiResponse_UserBlock';
export { $ApiResponse_UserDevice } from './schemas/$ApiResponse_UserDevice';
export { $ApiResponse_UserFollow } from './schemas/$ApiResponse_UserFollow';
export { $ApiResponse_UserGpgKey } from './schemas/$ApiResponse_UserGpgKey';
export { $ApiResponse_UserNotifySetting } from './schemas/$ApiResponse_UserNotifySetting';
export { $ApiResponse_UserOAuthInfo } from './schemas/$ApiResponse_UserOAuthInfo';
export { $ApiResponse_UserPersonalAccessTokenInfo } from './schemas/$ApiResponse_UserPersonalAccessTokenInfo';
export { $ApiResponse_UserPresence } from './schemas/$ApiResponse_UserPresence';
export { $ApiResponse_UserProfile } from './schemas/$ApiResponse_UserProfile';
export { $ApiResponse_UserSecurityLog } from './schemas/$ApiResponse_UserSecurityLog';
export { $ApiResponse_UserSessionInfo } from './schemas/$ApiResponse_UserSessionInfo';
export { $ApiResponse_UserSshKey } from './schemas/$ApiResponse_UserSshKey';
export { $ApiResponse_Vec_BranchProtectionRule } from './schemas/$ApiResponse_Vec_BranchProtectionRule';
export { $ApiResponse_Vec_Channel } from './schemas/$ApiResponse_Vec_Channel';
export { $ApiResponse_Vec_ChannelCategory } from './schemas/$ApiResponse_Vec_ChannelCategory';
export { $ApiResponse_Vec_ChannelDetail } from './schemas/$ApiResponse_Vec_ChannelDetail';
export { $ApiResponse_Vec_ChannelMember } from './schemas/$ApiResponse_Vec_ChannelMember';
export { $ApiResponse_Vec_Issue } from './schemas/$ApiResponse_Vec_Issue';
export { $ApiResponse_Vec_IssueAssignee } from './schemas/$ApiResponse_Vec_IssueAssignee';
export { $ApiResponse_Vec_IssueComment } from './schemas/$ApiResponse_Vec_IssueComment';
export { $ApiResponse_Vec_IssueCommentDetail } from './schemas/$ApiResponse_Vec_IssueCommentDetail';
export { $ApiResponse_Vec_IssueDetail } from './schemas/$ApiResponse_Vec_IssueDetail';
export { $ApiResponse_Vec_IssueEvent } from './schemas/$ApiResponse_Vec_IssueEvent';
export { $ApiResponse_Vec_IssueLabel } from './schemas/$ApiResponse_Vec_IssueLabel';
export { $ApiResponse_Vec_IssueLabelRelation } from './schemas/$ApiResponse_Vec_IssueLabelRelation';
@@ -428,6 +635,12 @@ export { $ApiResponse_Vec_IssueReaction } from './schemas/$ApiResponse_Vec_Issue
export { $ApiResponse_Vec_IssueRepoRelation } from './schemas/$ApiResponse_Vec_IssueRepoRelation';
export { $ApiResponse_Vec_IssueSubscriber } from './schemas/$ApiResponse_Vec_IssueSubscriber';
export { $ApiResponse_Vec_IssueTemplate } from './schemas/$ApiResponse_Vec_IssueTemplate';
export { $ApiResponse_Vec_Notification } from './schemas/$ApiResponse_Vec_Notification';
export { $ApiResponse_Vec_NotificationBlock } from './schemas/$ApiResponse_Vec_NotificationBlock';
export { $ApiResponse_Vec_NotificationDelivery } from './schemas/$ApiResponse_Vec_NotificationDelivery';
export { $ApiResponse_Vec_NotificationDetail } from './schemas/$ApiResponse_Vec_NotificationDetail';
export { $ApiResponse_Vec_NotificationSubscription } from './schemas/$ApiResponse_Vec_NotificationSubscription';
export { $ApiResponse_Vec_NotificationTemplate } from './schemas/$ApiResponse_Vec_NotificationTemplate';
export { $ApiResponse_Vec_PrAssignee } from './schemas/$ApiResponse_Vec_PrAssignee';
export { $ApiResponse_Vec_PrCheckRun } from './schemas/$ApiResponse_Vec_PrCheckRun';
export { $ApiResponse_Vec_PrCommit } from './schemas/$ApiResponse_Vec_PrCommit';
@@ -438,13 +651,16 @@ export { $ApiResponse_Vec_PrLabelRelation } from './schemas/$ApiResponse_Vec_PrL
export { $ApiResponse_Vec_PrReaction } from './schemas/$ApiResponse_Vec_PrReaction';
export { $ApiResponse_Vec_PrReview } from './schemas/$ApiResponse_Vec_PrReview';
export { $ApiResponse_Vec_PrReviewComment } from './schemas/$ApiResponse_Vec_PrReviewComment';
export { $ApiResponse_Vec_PrReviewDetail } from './schemas/$ApiResponse_Vec_PrReviewDetail';
export { $ApiResponse_Vec_PrSubscription } from './schemas/$ApiResponse_Vec_PrSubscription';
export { $ApiResponse_Vec_PullRequest } from './schemas/$ApiResponse_Vec_PullRequest';
export { $ApiResponse_Vec_PullRequestDetail } from './schemas/$ApiResponse_Vec_PullRequestDetail';
export { $ApiResponse_Vec_Repo } from './schemas/$ApiResponse_Vec_Repo';
export { $ApiResponse_Vec_RepoBranch } from './schemas/$ApiResponse_Vec_RepoBranch';
export { $ApiResponse_Vec_RepoCommitComment } from './schemas/$ApiResponse_Vec_RepoCommitComment';
export { $ApiResponse_Vec_RepoCommitStatus } from './schemas/$ApiResponse_Vec_RepoCommitStatus';
export { $ApiResponse_Vec_RepoDeployKey } from './schemas/$ApiResponse_Vec_RepoDeployKey';
export { $ApiResponse_Vec_RepoDetail } from './schemas/$ApiResponse_Vec_RepoDetail';
export { $ApiResponse_Vec_RepoFork } from './schemas/$ApiResponse_Vec_RepoFork';
export { $ApiResponse_Vec_RepoInvitation } from './schemas/$ApiResponse_Vec_RepoInvitation';
export { $ApiResponse_Vec_RepoMember } from './schemas/$ApiResponse_Vec_RepoMember';
@@ -453,7 +669,9 @@ export { $ApiResponse_Vec_RepoStar } from './schemas/$ApiResponse_Vec_RepoStar';
export { $ApiResponse_Vec_RepoTag } from './schemas/$ApiResponse_Vec_RepoTag';
export { $ApiResponse_Vec_RepoWatch } from './schemas/$ApiResponse_Vec_RepoWatch';
export { $ApiResponse_Vec_RepoWebhook } from './schemas/$ApiResponse_Vec_RepoWebhook';
export { $ApiResponse_Vec_UserBlock } from './schemas/$ApiResponse_Vec_UserBlock';
export { $ApiResponse_Vec_UserDevice } from './schemas/$ApiResponse_Vec_UserDevice';
export { $ApiResponse_Vec_UserFollow } from './schemas/$ApiResponse_Vec_UserFollow';
export { $ApiResponse_Vec_UserGpgKey } from './schemas/$ApiResponse_Vec_UserGpgKey';
export { $ApiResponse_Vec_UserOAuthInfo } from './schemas/$ApiResponse_Vec_UserOAuthInfo';
export { $ApiResponse_Vec_UserPersonalAccessTokenInfo } from './schemas/$ApiResponse_Vec_UserPersonalAccessTokenInfo';
@@ -464,6 +682,7 @@ export { $ApiResponse_Vec_WikiPage } from './schemas/$ApiResponse_Vec_WikiPage';
export { $ApiResponse_Vec_WikiPageRevision } from './schemas/$ApiResponse_Vec_WikiPageRevision';
export { $ApiResponse_Vec_Workspace } from './schemas/$ApiResponse_Vec_Workspace';
export { $ApiResponse_Vec_WorkspaceAuditLog } from './schemas/$ApiResponse_Vec_WorkspaceAuditLog';
export { $ApiResponse_Vec_WorkspaceDetail } from './schemas/$ApiResponse_Vec_WorkspaceDetail';
export { $ApiResponse_Vec_WorkspaceDomain } from './schemas/$ApiResponse_Vec_WorkspaceDomain';
export { $ApiResponse_Vec_WorkspaceIntegration } from './schemas/$ApiResponse_Vec_WorkspaceIntegration';
export { $ApiResponse_Vec_WorkspaceInvitation } from './schemas/$ApiResponse_Vec_WorkspaceInvitation';
@@ -476,6 +695,7 @@ export { $ApiResponse_WikiPageRevision } from './schemas/$ApiResponse_WikiPageRe
export { $ApiResponse_Workspace } from './schemas/$ApiResponse_Workspace';
export { $ApiResponse_WorkspaceBilling } from './schemas/$ApiResponse_WorkspaceBilling';
export { $ApiResponse_WorkspaceCustomBranding } from './schemas/$ApiResponse_WorkspaceCustomBranding';
export { $ApiResponse_WorkspaceDetail } from './schemas/$ApiResponse_WorkspaceDetail';
export { $ApiResponse_WorkspaceDomain } from './schemas/$ApiResponse_WorkspaceDomain';
export { $ApiResponse_WorkspaceIntegration } from './schemas/$ApiResponse_WorkspaceIntegration';
export { $ApiResponse_WorkspaceInvitation } from './schemas/$ApiResponse_WorkspaceInvitation';
@@ -484,16 +704,45 @@ export { $ApiResponse_WorkspacePendingApproval } from './schemas/$ApiResponse_Wo
export { $ApiResponse_WorkspaceSettings } from './schemas/$ApiResponse_WorkspaceSettings';
export { $ApiResponse_WorkspaceStats } from './schemas/$ApiResponse_WorkspaceStats';
export { $ApiResponse_WorkspaceWebhook } from './schemas/$ApiResponse_WorkspaceWebhook';
export { $AvatarData } from './schemas/$AvatarData';
export { $BlameHunk } from './schemas/$BlameHunk';
export { $BlameLine } from './schemas/$BlameLine';
export { $BlameResponse } from './schemas/$BlameResponse';
export { $Blob } from './schemas/$Blob';
export { $BlockBody } from './schemas/$BlockBody';
export { $Branch } from './schemas/$Branch';
export { $BranchMergeCheck } from './schemas/$BranchMergeCheck';
export { $BranchProtectionRule } from './schemas/$BranchProtectionRule';
export { $BranchUpstream } from './schemas/$BranchUpstream';
export { $CaptchaQuery } from './schemas/$CaptchaQuery';
export { $CaptchaResponse } from './schemas/$CaptchaResponse';
export { $ChangePasswordParams } from './schemas/$ChangePasswordParams';
export { $Channel } from './schemas/$Channel';
export { $ChannelBaseInfo } from './schemas/$ChannelBaseInfo';
export { $ChannelCategory } from './schemas/$ChannelCategory';
export { $ChannelDetail } from './schemas/$ChannelDetail';
export { $ChannelKind } from './schemas/$ChannelKind';
export { $ChannelListFilters } from './schemas/$ChannelListFilters';
export { $ChannelMember } from './schemas/$ChannelMember';
export { $ChannelType } from './schemas/$ChannelType';
export { $CherryPickParams } from './schemas/$CherryPickParams';
export { $ColorScheme } from './schemas/$ColorScheme';
export { $Commit } from './schemas/$Commit';
export { $CommitAction } from './schemas/$CommitAction';
export { $CommitStats } from './schemas/$CommitStats';
export { $CommitTrailer } from './schemas/$CommitTrailer';
export { $CompareCommitsResponse } from './schemas/$CompareCommitsResponse';
export { $ContextMe } from './schemas/$ContextMe';
export { $CreateBlockParams } from './schemas/$CreateBlockParams';
export { $CreateBranchBody } from './schemas/$CreateBranchBody';
export { $CreateBranchParams } from './schemas/$CreateBranchParams';
export { $CreateCategoryParams } from './schemas/$CreateCategoryParams';
export { $CreateChannelParams } from './schemas/$CreateChannelParams';
export { $CreateCheckRunParams } from './schemas/$CreateCheckRunParams';
export { $CreateCommentParams } from './schemas/$CreateCommentParams';
export { $CreateCommitCommentParams } from './schemas/$CreateCommitCommentParams';
export { $CreateCommitParams } from './schemas/$CreateCommitParams';
export { $CreateCommitResponse } from './schemas/$CreateCommitResponse';
export { $CreateCommitStatusParams } from './schemas/$CreateCommitStatusParams';
export { $CreateIntegrationParams } from './schemas/$CreateIntegrationParams';
export { $CreateInvitationParams } from './schemas/$CreateInvitationParams';
@@ -502,6 +751,7 @@ export { $CreateIssueParams } from './schemas/$CreateIssueParams';
export { $CreateIssueReactionParams } from './schemas/$CreateIssueReactionParams';
export { $CreateLabelParams } from './schemas/$CreateLabelParams';
export { $CreateMilestoneParams } from './schemas/$CreateMilestoneParams';
export { $CreatePersonalAccessTokenResponse } from './schemas/$CreatePersonalAccessTokenResponse';
export { $CreatePrLabelParams } from './schemas/$CreatePrLabelParams';
export { $CreateProtectionRuleParams } from './schemas/$CreateProtectionRuleParams';
export { $CreatePrParams } from './schemas/$CreatePrParams';
@@ -510,13 +760,21 @@ export { $CreateReleaseParams } from './schemas/$CreateReleaseParams';
export { $CreateRepoInvitationParams } from './schemas/$CreateRepoInvitationParams';
export { $CreateRepoParams } from './schemas/$CreateRepoParams';
export { $CreateReviewParams } from './schemas/$CreateReviewParams';
export { $CreateSubscriptionParams } from './schemas/$CreateSubscriptionParams';
export { $CreateTagBody } from './schemas/$CreateTagBody';
export { $CreateTagParams } from './schemas/$CreateTagParams';
export { $CreateTemplateParams } from './schemas/$CreateTemplateParams';
export { $CreateTokenBody } from './schemas/$CreateTokenBody';
export { $CreateWebhookParams } from './schemas/$CreateWebhookParams';
export { $CreateWikiPageParams } from './schemas/$CreateWikiPageParams';
export { $CreateWorkspaceParams } from './schemas/$CreateWorkspaceParams';
export { $DeliveryChannel } from './schemas/$DeliveryChannel';
export { $Density } from './schemas/$Density';
export { $DeviceType } from './schemas/$DeviceType';
export { $DiffFile } from './schemas/$DiffFile';
export { $DiffHunk } from './schemas/$DiffHunk';
export { $DiffLine } from './schemas/$DiffLine';
export { $DiffStats } from './schemas/$DiffStats';
export { $DigestFrequency } from './schemas/$DigestFrequency';
export { $Disable2FAParams } from './schemas/$Disable2FAParams';
export { $DismissReviewParams } from './schemas/$DismissReviewParams';
@@ -527,11 +785,19 @@ export { $Enable2FAResponse } from './schemas/$Enable2FAResponse';
export { $EventType } from './schemas/$EventType';
export { $FontSize } from './schemas/$FontSize';
export { $ForkRepoParams } from './schemas/$ForkRepoParams';
export { $ForumLayout } from './schemas/$ForumLayout';
export { $ForumSortOrder } from './schemas/$ForumSortOrder';
export { $Get2FAStatusResponse } from './schemas/$Get2FAStatusResponse';
export { $GetDiffResponse } from './schemas/$GetDiffResponse';
export { $GitService } from './schemas/$GitService';
export { $Identity } from './schemas/$Identity';
export { $InviteMemberParams } from './schemas/$InviteMemberParams';
export { $Issue } from './schemas/$Issue';
export { $IssueAssignee } from './schemas/$IssueAssignee';
export { $IssueBaseInfo } from './schemas/$IssueBaseInfo';
export { $IssueComment } from './schemas/$IssueComment';
export { $IssueCommentDetail } from './schemas/$IssueCommentDetail';
export { $IssueDetail } from './schemas/$IssueDetail';
export { $IssueEvent } from './schemas/$IssueEvent';
export { $IssueLabel } from './schemas/$IssueLabel';
export { $IssueLabelRelation } from './schemas/$IssueLabelRelation';
@@ -545,17 +811,36 @@ export { $IssueTemplate } from './schemas/$IssueTemplate';
export { $KeyType } from './schemas/$KeyType';
export { $LinkPrParams } from './schemas/$LinkPrParams';
export { $LinkRepoParams } from './schemas/$LinkRepoParams';
export { $ListBranchesResponse } from './schemas/$ListBranchesResponse';
export { $ListCommitsResponse } from './schemas/$ListCommitsResponse';
export { $ListMergeConflictsResponse } from './schemas/$ListMergeConflictsResponse';
export { $ListTagsResponse } from './schemas/$ListTagsResponse';
export { $ListTreeResponse } from './schemas/$ListTreeResponse';
export { $LockIssueParams } from './schemas/$LockIssueParams';
export { $LockPrParams } from './schemas/$LockPrParams';
export { $LoginParams } from './schemas/$LoginParams';
export { $MergeConflict } from './schemas/$MergeConflict';
export { $MergeConflictSection } from './schemas/$MergeConflictSection';
export { $MergeParams } from './schemas/$MergeParams';
export { $MergePrParams } from './schemas/$MergePrParams';
export { $MergeResult } from './schemas/$MergeResult';
export { $MergeStrategyKind } from './schemas/$MergeStrategyKind';
export { $MuteIssueParams } from './schemas/$MuteIssueParams';
export { $MutePrParams } from './schemas/$MutePrParams';
export { $Notification } from './schemas/$Notification';
export { $NotificationBlock } from './schemas/$NotificationBlock';
export { $NotificationDelivery } from './schemas/$NotificationDelivery';
export { $NotificationDetail } from './schemas/$NotificationDetail';
export { $NotificationSubscription } from './schemas/$NotificationSubscription';
export { $NotificationTemplate } from './schemas/$NotificationTemplate';
export { $NotificationType } from './schemas/$NotificationType';
export { $Oid } from './schemas/$Oid';
export { $PageInfo } from './schemas/$PageInfo';
export { $Permission } from './schemas/$Permission';
export { $PrAssignee } from './schemas/$PrAssignee';
export { $PrCheckRun } from './schemas/$PrCheckRun';
export { $PrCommit } from './schemas/$PrCommit';
export { $PresenceStatus } from './schemas/$PresenceStatus';
export { $PrEvent } from './schemas/$PrEvent';
export { $PrFile } from './schemas/$PrFile';
export { $Priority } from './schemas/$Priority';
@@ -567,9 +852,15 @@ export { $Provider } from './schemas/$Provider';
export { $PrReaction } from './schemas/$PrReaction';
export { $PrReview } from './schemas/$PrReview';
export { $PrReviewComment } from './schemas/$PrReviewComment';
export { $PrReviewDetail } from './schemas/$PrReviewDetail';
export { $PrStatus } from './schemas/$PrStatus';
export { $PrSubscription } from './schemas/$PrSubscription';
export { $PullRequest } from './schemas/$PullRequest';
export { $PullRequestBaseInfo } from './schemas/$PullRequestBaseInfo';
export { $PullRequestDetail } from './schemas/$PullRequestDetail';
export { $RebaseParams } from './schemas/$RebaseParams';
export { $RebaseResult } from './schemas/$RebaseResult';
export { $RecentCommit } from './schemas/$RecentCommit';
export { $Regenerate2FABackupCodesRequest } from './schemas/$Regenerate2FABackupCodesRequest';
export { $Regenerate2FABackupCodesResponse } from './schemas/$Regenerate2FABackupCodesResponse';
export { $RegisterEmailCodeParams } from './schemas/$RegisterEmailCodeParams';
@@ -578,14 +869,21 @@ export { $RegisterParams } from './schemas/$RegisterParams';
export { $RegisterResponse } from './schemas/$RegisterResponse';
export { $RelationType } from './schemas/$RelationType';
export { $Repo } from './schemas/$Repo';
export { $RepoBaseInfo } from './schemas/$RepoBaseInfo';
export { $RepoBranch } from './schemas/$RepoBranch';
export { $RepoCommitComment } from './schemas/$RepoCommitComment';
export { $RepoCommitStatus } from './schemas/$RepoCommitStatus';
export { $RepoDeployKey } from './schemas/$RepoDeployKey';
export { $RepoDetail } from './schemas/$RepoDetail';
export { $RepoFork } from './schemas/$RepoFork';
export { $RepoInvitation } from './schemas/$RepoInvitation';
export { $RepoMember } from './schemas/$RepoMember';
export { $RepoRelease } from './schemas/$RepoRelease';
export { $Repository } from './schemas/$Repository';
export { $RepositoryHeader } from './schemas/$RepositoryHeader';
export { $RepositoryHealthResponse } from './schemas/$RepositoryHealthResponse';
export { $RepositoryMaintenanceResponse } from './schemas/$RepositoryMaintenanceResponse';
export { $RepositoryStatistics } from './schemas/$RepositoryStatistics';
export { $RepoStar } from './schemas/$RepoStar';
export { $RepoStats } from './schemas/$RepoStats';
export { $RepoTag } from './schemas/$RepoTag';
@@ -595,37 +893,51 @@ export { $RequestApprovalParams } from './schemas/$RequestApprovalParams';
export { $RequestType } from './schemas/$RequestType';
export { $ResetPasswordRequest } from './schemas/$ResetPasswordRequest';
export { $ResetPasswordVerifyParams } from './schemas/$ResetPasswordVerifyParams';
export { $RevertParams } from './schemas/$RevertParams';
export { $ReviewApprovalRequest } from './schemas/$ReviewApprovalRequest';
export { $ReviewCommentParams } from './schemas/$ReviewCommentParams';
export { $Role } from './schemas/$Role';
export { $RsaResponse } from './schemas/$RsaResponse';
export { $Scope } from './schemas/$Scope';
export { $SetBranchProtectionParams } from './schemas/$SetBranchProtectionParams';
export { $Signature } from './schemas/$Signature';
export { $State } from './schemas/$State';
export { $Status } from './schemas/$Status';
export { $SubmitReviewParams } from './schemas/$SubmitReviewParams';
export { $SubscriptionLevel } from './schemas/$SubscriptionLevel';
export { $Tag } from './schemas/$Tag';
export { $TargetType } from './schemas/$TargetType';
export { $Theme } from './schemas/$Theme';
export { $Timestamp } from './schemas/$Timestamp';
export { $TransferIssueParams } from './schemas/$TransferIssueParams';
export { $TransferOwnerParams } from './schemas/$TransferOwnerParams';
export { $TransferOwnerRequest } from './schemas/$TransferOwnerRequest';
export { $TreeEntry } from './schemas/$TreeEntry';
export { $UpdateBillingParams } from './schemas/$UpdateBillingParams';
export { $UpdateBrandingParams } from './schemas/$UpdateBrandingParams';
export { $UpdateCategoryParams } from './schemas/$UpdateCategoryParams';
export { $UpdateChannelParams } from './schemas/$UpdateChannelParams';
export { $UpdateCheckRunParams } from './schemas/$UpdateCheckRunParams';
export { $UpdateCommentParams } from './schemas/$UpdateCommentParams';
export { $UpdateCommitCommentParams } from './schemas/$UpdateCommitCommentParams';
export { $UpdateDomainParams } from './schemas/$UpdateDomainParams';
export { $UpdateIntegrationParams } from './schemas/$UpdateIntegrationParams';
export { $UpdateIssueParams } from './schemas/$UpdateIssueParams';
export { $UpdateLabelParams } from './schemas/$UpdateLabelParams';
export { $UpdateMemberParams } from './schemas/$UpdateMemberParams';
export { $UpdateMemberRoleParams } from './schemas/$UpdateMemberRoleParams';
export { $UpdateMergeStrategyParams } from './schemas/$UpdateMergeStrategyParams';
export { $UpdateMilestoneParams } from './schemas/$UpdateMilestoneParams';
export { $UpdatePresenceBody } from './schemas/$UpdatePresenceBody';
export { $UpdatePrLabelParams } from './schemas/$UpdatePrLabelParams';
export { $UpdateProtectionRuleParams } from './schemas/$UpdateProtectionRuleParams';
export { $UpdatePrParams } from './schemas/$UpdatePrParams';
export { $UpdateReleaseParams } from './schemas/$UpdateReleaseParams';
export { $UpdateRepoMemberRoleParams } from './schemas/$UpdateRepoMemberRoleParams';
export { $UpdateRepoParams } from './schemas/$UpdateRepoParams';
export { $UpdateSubscriptionParams } from './schemas/$UpdateSubscriptionParams';
export { $UpdateTagBody } from './schemas/$UpdateTagBody';
export { $UpdateTagParams } from './schemas/$UpdateTagParams';
export { $UpdateTemplateParams } from './schemas/$UpdateTemplateParams';
export { $UpdateUserAccountParams } from './schemas/$UpdateUserAccountParams';
export { $UpdateUserAppearanceParams } from './schemas/$UpdateUserAppearanceParams';
@@ -635,30 +947,36 @@ export { $UpdateWebhookParams } from './schemas/$UpdateWebhookParams';
export { $UpdateWikiPageParams } from './schemas/$UpdateWikiPageParams';
export { $UpdateWorkspaceParams } from './schemas/$UpdateWorkspaceParams';
export { $UpdateWorkspaceSettingsParams } from './schemas/$UpdateWorkspaceSettingsParams';
export { $UploadUserAvatarParams } from './schemas/$UploadUserAvatarParams';
export { $User } from './schemas/$User';
export { $UserAppearance } from './schemas/$UserAppearance';
export { $UserAvatarResponse } from './schemas/$UserAvatarResponse';
export { $UserBaseInfo } from './schemas/$UserBaseInfo';
export { $UserBlock } from './schemas/$UserBlock';
export { $UserDevice } from './schemas/$UserDevice';
export { $UserFollow } from './schemas/$UserFollow';
export { $UserGpgKey } from './schemas/$UserGpgKey';
export { $UserNotifySetting } from './schemas/$UserNotifySetting';
export { $UserOAuthInfo } from './schemas/$UserOAuthInfo';
export { $UserPersonalAccessTokenInfo } from './schemas/$UserPersonalAccessTokenInfo';
export { $UserPresence } from './schemas/$UserPresence';
export { $UserProfile } from './schemas/$UserProfile';
export { $UserSecurityLog } from './schemas/$UserSecurityLog';
export { $UserSessionInfo } from './schemas/$UserSessionInfo';
export { $UserSshKey } from './schemas/$UserSshKey';
export { $Value } from './schemas/$Value';
export { $VerifiedSignature } from './schemas/$VerifiedSignature';
export { $Verify2FAParams } from './schemas/$Verify2FAParams';
export { $Visibility } from './schemas/$Visibility';
export { $WatchParams } from './schemas/$WatchParams';
export { $WikiCompareResult } from './schemas/$WikiCompareResult';
export { $WikiPage } from './schemas/$WikiPage';
export { $WikiPageBaseInfo } from './schemas/$WikiPageBaseInfo';
export { $WikiPageRevision } from './schemas/$WikiPageRevision';
export { $Workspace } from './schemas/$Workspace';
export { $WorkspaceAuditLog } from './schemas/$WorkspaceAuditLog';
export { $WorkspaceBaseInfo } from './schemas/$WorkspaceBaseInfo';
export { $WorkspaceBilling } from './schemas/$WorkspaceBilling';
export { $WorkspaceCustomBranding } from './schemas/$WorkspaceCustomBranding';
export { $WorkspaceDetail } from './schemas/$WorkspaceDetail';
export { $WorkspaceDomain } from './schemas/$WorkspaceDomain';
export { $WorkspaceIntegration } from './schemas/$WorkspaceIntegration';
export { $WorkspaceIntegrationConfig } from './schemas/$WorkspaceIntegrationConfig';
@@ -670,7 +988,10 @@ export { $WorkspaceStats } from './schemas/$WorkspaceStats';
export { $WorkspaceWebhook } from './schemas/$WorkspaceWebhook';
export { AuthService } from './services/AuthService';
export { GitService } from './services/GitService';
export { ImService } from './services/ImService';
export { IssuesService } from './services/IssuesService';
export { NotificationsService } from './services/NotificationsService';
export { PullRequestsService } from './services/PullRequestsService';
export { ReposService } from './services/ReposService';
export { UserService } from './services/UserService';
@@ -2,9 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type UploadUserAvatarParams = {
content_type?: string | null;
data: Array<number>;
file_name?: string | null;
export type ApiListResponse_Value = {
data: Array<any>;
page: number;
per_page: number;
total: number;
};
@@ -2,7 +2,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiResponse_UserAvatarResponse = {
export type ApiResponse_AvatarData = {
data: {
avatar_url: string;
storage_key: string;
@@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BlameHunk } from './BlameHunk';
import type { PageInfo } from './PageInfo';
export type ApiResponse_BlameResponse = {
data: {
hunks: Array<BlameHunk>;
page_info?: (null | PageInfo);
truncated: boolean;
};
};
+21
View File
@@ -0,0 +1,21 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Oid } from './Oid';
import type { RecentCommit } from './RecentCommit';
export type ApiResponse_Blob = {
data: {
binary: boolean;
data: Array<number>;
encoding: string;
is_lfs: boolean;
mode: number;
oid?: (null | Oid);
path: string;
recent_commit?: (null | RecentCommit);
size: number;
truncated: boolean;
};
};
+21
View File
@@ -0,0 +1,21 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BranchUpstream } from './BranchUpstream';
import type { Commit } from './Commit';
import type { Oid } from './Oid';
export type ApiResponse_Branch = {
data: {
commit?: (null | Commit);
full_ref: string;
is_default: boolean;
is_detached: boolean;
is_head: boolean;
is_merged: boolean;
name: string;
target_oid?: (null | Oid);
upstream?: (null | BranchUpstream);
};
};
+48
View File
@@ -0,0 +1,48 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ChannelKind } from './ChannelKind';
import type { ChannelType } from './ChannelType';
import type { ForumLayout } from './ForumLayout';
import type { ForumSortOrder } from './ForumSortOrder';
import type { Value } from './Value';
import type { Visibility } from './Visibility';
export type ApiResponse_Channel = {
data: {
archived: boolean;
archived_at?: string | null;
available_tags?: (null | Value);
bitrate?: number | null;
category_id?: string | null;
channel_kind: ChannelKind;
channel_type: ChannelType;
created_at: string;
created_by: string;
default_auto_archive_duration?: number | null;
default_forum_layout?: (null | ForumLayout);
default_reaction_emoji?: string | null;
default_sort_order?: (null | ForumSortOrder);
default_thread_rate_limit?: number | null;
deleted_at?: string | null;
description?: string | null;
id: string;
last_message_at?: string | null;
last_message_id?: string | null;
name: string;
nsfw: boolean;
parent_channel_id?: string | null;
position?: number | null;
rate_limit_per_user?: number | null;
read_only: boolean;
repo_id?: string | null;
require_tag?: boolean | null;
rtc_region?: string | null;
topic?: string | null;
updated_at: string;
user_limit?: number | null;
visibility: Visibility;
workspace_id: string;
};
};
@@ -0,0 +1,17 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiResponse_ChannelCategory = {
data: {
collapsed: boolean;
created_at: string;
created_by: string;
id: string;
name: string;
position: number;
updated_at: string;
workspace_id: string;
};
};
@@ -0,0 +1,38 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ChannelKind } from './ChannelKind';
import type { ChannelType } from './ChannelType';
import type { UserBaseInfo } from './UserBaseInfo';
import type { Visibility } from './Visibility';
export type ApiResponse_ChannelDetail = {
data: {
archived: boolean;
archived_at?: string | null;
bitrate?: number | null;
category_id?: string | null;
channel_kind: ChannelKind;
channel_type: ChannelType;
created_at: string;
creator: UserBaseInfo;
deleted_at?: string | null;
description?: string | null;
id: string;
last_message_at?: string | null;
last_message_id?: string | null;
name: string;
nsfw: boolean;
parent_channel_id?: string | null;
position?: number | null;
read_only: boolean;
repo_id?: string | null;
rtc_region?: string | null;
topic?: string | null;
updated_at: string;
user_limit?: number | null;
visibility: Visibility;
workspace_id: string;
};
};
@@ -0,0 +1,24 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Role } from './Role';
import type { Status } from './Status';
export type ApiResponse_ChannelMember = {
data: {
channel_id: string;
created_at: string;
id: string;
joined_at?: string | null;
last_read_at?: string | null;
last_read_message_id?: string | null;
left_at?: string | null;
muted: boolean;
pinned: boolean;
role: Role;
status: Status;
updated_at: string;
user_id: string;
};
};
+30
View File
@@ -0,0 +1,30 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CommitStats } from './CommitStats';
import type { CommitTrailer } from './CommitTrailer';
import type { Oid } from './Oid';
import type { Signature } from './Signature';
import type { Timestamp } from './Timestamp';
import type { VerifiedSignature } from './VerifiedSignature';
export type ApiResponse_Commit = {
data: {
abbreviated_oid: string;
author?: (null | Signature);
authored_at?: (null | Timestamp);
body: string;
committed_at?: (null | Timestamp);
committer?: (null | Signature);
message: string;
oid?: (null | Oid);
parent_oids: Array<Oid>;
raw: Array<number>;
signature?: (null | VerifiedSignature);
stats?: (null | CommitStats);
subject: string;
trailers: Array<CommitTrailer>;
tree_oid?: (null | Oid);
};
};
@@ -0,0 +1,17 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Commit } from './Commit';
import type { CommitStats } from './CommitStats';
import type { Oid } from './Oid';
import type { PageInfo } from './PageInfo';
export type ApiResponse_CompareCommitsResponse = {
data: {
commits: Array<Commit>;
merge_base?: (null | Oid);
page_info?: (null | PageInfo);
stats?: (null | CommitStats);
};
};
@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Commit } from './Commit';
export type ApiResponse_CreateCommitResponse = {
data: {
branch: string;
commit?: (null | Commit);
};
};
@@ -0,0 +1,16 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Scope } from './Scope';
export type ApiResponse_CreatePersonalAccessTokenResponse = {
data: {
created_at: string;
expires_at?: string | null;
id: string;
name: string;
scopes: Array<Scope>;
token: string;
};
};
@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApiResponse_DiffStats = {
data: {
additions: number;
changed_files: number;
deletions: number;
};
};
@@ -0,0 +1,16 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DiffFile } from './DiffFile';
import type { DiffStats } from './DiffStats';
import type { PageInfo } from './PageInfo';
export type ApiResponse_GetDiffResponse = {
data: {
files: Array<DiffFile>;
overflow: boolean;
page_info?: (null | PageInfo);
stats?: (null | DiffStats);
};
};
@@ -0,0 +1,18 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserBaseInfo } from './UserBaseInfo';
export type ApiResponse_IssueCommentDetail = {
data: {
author: UserBaseInfo;
body: string;
created_at: string;
deleted_at?: string | null;
id: string;
issue_id: string;
reply_to_comment_id?: string | null;
updated_at: string;
};
};
@@ -0,0 +1,30 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Priority } from './Priority';
import type { State } from './State';
import type { UserBaseInfo } from './UserBaseInfo';
import type { Visibility } from './Visibility';
export type ApiResponse_IssueDetail = {
data: {
author: UserBaseInfo;
body?: string | null;
closed_at?: string | null;
closed_by?: string | null;
created_at: string;
deleted_at?: string | null;
due_at?: string | null;
id: string;
locked: boolean;
milestone_id?: string | null;
number: number;
priority: Priority;
state: State;
title: string;
updated_at: string;
visibility: Visibility;
workspace_id: string;
};
};
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Branch } from './Branch';
import type { PageInfo } from './PageInfo';
export type ApiResponse_ListBranchesResponse = {
data: {
branches: Array<Branch>;
page_info?: (null | PageInfo);
};
};
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Commit } from './Commit';
import type { PageInfo } from './PageInfo';
export type ApiResponse_ListCommitsResponse = {
data: {
commits: Array<Commit>;
page_info?: (null | PageInfo);
};
};
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { MergeConflict } from './MergeConflict';
import type { PageInfo } from './PageInfo';
export type ApiResponse_ListMergeConflictsResponse = {
data: {
conflicts: Array<MergeConflict>;
page_info?: (null | PageInfo);
};
};
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PageInfo } from './PageInfo';
import type { Tag } from './Tag';
export type ApiResponse_ListTagsResponse = {
data: {
page_info?: (null | PageInfo);
tags: Array<Tag>;
};
};
@@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PageInfo } from './PageInfo';
import type { TreeEntry } from './TreeEntry';
export type ApiResponse_ListTreeResponse = {
data: {
entries: Array<TreeEntry>;
page_info?: (null | PageInfo);
truncated: boolean;
};
};
@@ -0,0 +1,19 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Commit } from './Commit';
import type { DiffStats } from './DiffStats';
import type { MergeConflict } from './MergeConflict';
import type { Oid } from './Oid';
export type ApiResponse_MergeResult = {
data: {
commit?: (null | Commit);
conflicts: Array<MergeConflict>;
merge_base?: (null | Oid);
message: string;
stats?: (null | DiffStats);
status: number;
};
};
@@ -0,0 +1,34 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { NotificationType } from './NotificationType';
import type { Priority } from './Priority';
import type { TargetType } from './TargetType';
export type ApiResponse_Notification = {
data: {
action_url?: string | null;
actor_id?: string | null;
body?: string | null;
channel_id?: string | null;
created_at: string;
deleted_at?: string | null;
dismissed_at?: string | null;
id: string;
issue_id?: string | null;
message_id?: string | null;
metadata: any;
notification_type: NotificationType;
priority: Priority;
pull_request_id?: string | null;
read_at?: string | null;
repo_id?: string | null;
target_id?: string | null;
target_type?: (null | TargetType);
title: string;
updated_at: string;
user_id: string;
workspace_id?: string | null;
};
};
@@ -0,0 +1,24 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DeliveryChannel } from './DeliveryChannel';
import type { NotificationType } from './NotificationType';
import type { TargetType } from './TargetType';
export type ApiResponse_NotificationBlock = {
data: {
channel?: (null | DeliveryChannel);
created_at: string;
expires_at?: string | null;
id: string;
notification_type?: (null | NotificationType);
reason?: string | null;
repo_id?: string | null;
target_id?: string | null;
target_type: TargetType;
updated_at: string;
user_id: string;
workspace_id?: string | null;
};
};
@@ -0,0 +1,28 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DeliveryChannel } from './DeliveryChannel';
import type { Provider } from './Provider';
import type { Status } from './Status';
export type ApiResponse_NotificationDelivery = {
data: {
attempts: number;
channel: DeliveryChannel;
created_at: string;
delivered_at?: string | null;
destination?: string | null;
failed_at?: string | null;
id: string;
last_error?: string | null;
notification_id: string;
provider?: (null | Provider);
provider_message_id?: string | null;
scheduled_at?: string | null;
sent_at?: string | null;
status: Status;
updated_at: string;
user_id: string;
};
};
@@ -0,0 +1,37 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { NotificationType } from './NotificationType';
import type { Priority } from './Priority';
import type { RepoBaseInfo } from './RepoBaseInfo';
import type { TargetType } from './TargetType';
import type { UserBaseInfo } from './UserBaseInfo';
import type { WorkspaceBaseInfo } from './WorkspaceBaseInfo';
export type ApiResponse_NotificationDetail = {
data: {
action_url?: string | null;
actor?: (null | UserBaseInfo);
body?: string | null;
channel_id?: string | null;
created_at: string;
deleted_at?: string | null;
dismissed_at?: string | null;
id: string;
issue_id?: string | null;
message_id?: string | null;
metadata: any;
notification_type: NotificationType;
priority: Priority;
pull_request_id?: string | null;
read_at?: string | null;
repo?: (null | RepoBaseInfo);
target_id?: string | null;
target_type?: (null | TargetType);
title: string;
updated_at: string;
user_id: string;
workspace?: (null | WorkspaceBaseInfo);
};
};
@@ -0,0 +1,25 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { EventType } from './EventType';
import type { SubscriptionLevel } from './SubscriptionLevel';
import type { TargetType } from './TargetType';
export type ApiResponse_NotificationSubscription = {
data: {
channels: Array<string>;
created_at: string;
event_types: Array<EventType>;
id: string;
level: SubscriptionLevel;
muted: boolean;
muted_until?: string | null;
repo_id?: string | null;
target_id?: string | null;
target_type: TargetType;
updated_at: string;
user_id: string;
workspace_id?: string | null;
};
};
@@ -0,0 +1,24 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DeliveryChannel } from './DeliveryChannel';
import type { NotificationType } from './NotificationType';
export type ApiResponse_NotificationTemplate = {
data: {
action_text_template?: string | null;
body_template: string;
channel: DeliveryChannel;
created_at: string;
created_by?: string | null;
enabled: boolean;
id: string;
key: string;
locale: string;
notification_type: NotificationType;
subject_template?: string | null;
title_template: string;
updated_at: string;
};
};
@@ -0,0 +1,20 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserBaseInfo } from './UserBaseInfo';
export type ApiResponse_PrReviewDetail = {
data: {
author: UserBaseInfo;
body?: string | null;
created_at: string;
dismissed: boolean;
dismissed_at?: string | null;
dismissed_by?: string | null;
id: string;
pull_request_id: string;
state: string;
updated_at: string;
};
};
@@ -0,0 +1,34 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { State } from './State';
import type { UserBaseInfo } from './UserBaseInfo';
export type ApiResponse_PullRequestDetail = {
data: {
author: UserBaseInfo;
base_commit_sha?: string | null;
body?: string | null;
closed_at?: string | null;
closed_by?: string | null;
created_at: string;
deleted_at?: string | null;
draft: boolean;
head_commit_sha: string;
id: string;
locked: boolean;
merge_commit_sha?: string | null;
merged_at?: string | null;
merged_by?: string | null;
number: number;
repo_id: string;
source_branch: string;
source_repo_id: string;
state: State;
target_branch: string;
target_repo_id: string;
title: string;
updated_at: string;
};
};
@@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Commit } from './Commit';
import type { MergeConflict } from './MergeConflict';
export type ApiResponse_RebaseResult = {
data: {
conflicts: Array<MergeConflict>;
head?: (null | Commit);
status: number;
};
};
+10
View File
@@ -7,13 +7,22 @@ import type { Status } from './Status';
import type { Visibility } from './Visibility';
export type ApiResponse_Repo = {
data: {
allow_forking: boolean;
allow_merge_commit: boolean;
allow_rebase_merge: boolean;
allow_squash_merge: boolean;
archived_at?: string | null;
created_at: string;
default_branch: string;
delete_branch_on_merge: boolean;
deleted_at?: string | null;
description?: string | null;
forked_from_repo_id?: string | null;
git_service: GitService;
has_issues: boolean;
has_pull_requests: boolean;
has_wiki: boolean;
homepage?: string | null;
id: string;
is_fork: boolean;
name: string;
@@ -22,6 +31,7 @@ export type ApiResponse_Repo = {
status: Status;
storage_node_ids: Array<string>;
storage_path: string;
topics: Array<string>;
updated_at: string;
visibility: Visibility;
workspace_id: string;
@@ -0,0 +1,42 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { GitService } from './GitService';
import type { Status } from './Status';
import type { UserBaseInfo } from './UserBaseInfo';
import type { Visibility } from './Visibility';
import type { WorkspaceBaseInfo } from './WorkspaceBaseInfo';
export type ApiResponse_RepoDetail = {
data: {
allow_forking: boolean;
allow_merge_commit: boolean;
allow_rebase_merge: boolean;
allow_squash_merge: boolean;
archived_at?: string | null;
created_at: string;
default_branch: string;
delete_branch_on_merge: boolean;
deleted_at?: string | null;
description?: string | null;
forked_from_repo_id?: string | null;
git_service: GitService;
has_issues: boolean;
has_pull_requests: boolean;
has_wiki: boolean;
homepage?: string | null;
id: string;
is_fork: boolean;
name: string;
owner: UserBaseInfo;
primary_storage_node_id: string;
status: Status;
storage_node_ids: Array<string>;
storage_path: string;
topics: Array<string>;
updated_at: string;
visibility: Visibility;
workspace: WorkspaceBaseInfo;
};
};
@@ -0,0 +1,17 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { RepositoryHeader } from './RepositoryHeader';
export type ApiResponse_Repository = {
data: {
bare: boolean;
default_branch: string;
empty: boolean;
git_alternate_object_directories: Array<string>;
git_object_directory: string;
header?: (null | RepositoryHeader);
object_format: number;
};
};
@@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { RepositoryStatistics } from './RepositoryStatistics';
export type ApiResponse_RepositoryHealthResponse = {
data: {
errors: Array<string>;
ok: boolean;
statistics?: (null | RepositoryStatistics);
warnings: Array<string>;
};
};

Some files were not shown because too many files have changed in this diff Show More