Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat(admin): init project (#7197)

Brooooooklyn0fe672efa5b0
diff --git a/.eslintrc.js b/.eslintrc.js
index fb0b5d235b..e1eb1430d0 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -157,11 +157,6 @@ const config = {
message: "Import from '@blocksuite/global/utils'",
importNames: ['assertExists', 'assertEquals'],
},
- {
- group: ['react-router-dom'],
- message: 'Use `useNavigateHelper` instead',
- importNames: ['useNavigate'],
- },
],
},
],
diff --git a/.github/deployment/front/Dockerfile b/.github/deployment/front/Dockerfile
index 81030c7aa1..0e2f90f1e7 100644
--- a/.github/deployment/front/Dockerfile
+++ b/.github/deployment/front/Dockerfile
@@ -1,6 +1,7 @@
FROM openresty/openresty:1.25.3.1-0-buster
WORKDIR /app
COPY ./packages/frontend/web/dist ./dist
+COPY ./packages/frontend/admin/dist ./admin
COPY ./.github/deployment/front/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY ./.github/deployment/front/affine.nginx.conf /etc/nginx/conf.d/affine.nginx.conf
diff --git a/.github/deployment/front/affine.nginx.conf b/.github/deployment/front/affine.nginx.conf
index c424ee3655..67e2caaf53 100644
--- a/.github/deployment/front/affine.nginx.conf
+++ b/.github/deployment/front/affine.nginx.conf
@@ -1,13 +1,17 @@
server {
- listen 8080;
- root /app/dist;
+ listen 8080;
+ root /app;
- location / {
- try_files $uri $uri/ /index.html;
- }
+ location /admin {
+ try_files $uri $uri/ /admin/index.html;
+ }
- error_page 404 /404.html;
- location = /404.html {
- internal;
- }
+ location / {
+ try_files $uri $uri/ /dist/index.html;
+ }
+
+ error_page 404 /404.html;
+ location = /404.html {
+ internal;
+ }
}
diff --git a/.github/deployment/node/Dockerfile b/.github/deployment/node/Dockerfile
index 716431210f..6190734232 100644
--- a/.github/deployment/node/Dockerfile
+++ b/.github/deployment/node/Dockerfile
@@ -2,6 +2,7 @@ FROM node:20-bookworm-slim
COPY ./packages/backend/server /app
COPY ./packages/frontend/web/dist /app/static
+COPY ./packages/frontend/admin/dist /app/static/admin
WORKDIR /app
RUN apt-get update && \
diff --git a/.github/workflows/build-server-image.yml b/.github/workflows/build-server-image.yml
index 98fb207188..d6e82a0591 100644
--- a/.github/workflows/build-server-image.yml
+++ b/.github/workflows/build-server-image.yml
@@ -6,6 +6,11 @@ on:
flavor:
type: string
required: true
+ workflow_dispatch:
+ inputs:
+ flavor:
+ type: string
+ required: false
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
@@ -66,6 +71,32 @@ jobs:
path: ./packages/frontend/web/dist
if-no-files-found: error
+ build-admin-selfhost:
+ name: Build @affine/admin selfhost
+ runs-on: ubuntu-latest
+ environment: ${{ github.event.inputs.flavor }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup Version
+ id: version
+ uses: ./.github/actions/setup-version
+ - name: Setup Node.js
+ uses: ./.github/actions/setup-node
+ - name: Build Core
+ run: yarn nx build @affine/admin --skip-nx-cache
+ env:
+ BUILD_TYPE: ${{ github.event.inputs.flavor }}
+ SHOULD_REPORT_TRACE: false
+ PUBLIC_PATH: '/admin/'
+ SELF_HOSTED: true
+ MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
+ - name: Upload admin artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: selfhost-admin
+ path: ./packages/frontend/admin/dist
+ if-no-files-found: error
+
build-server-native:
name: Build Server native - ${{ matrix.targets.name }}
runs-on: ubuntu-latest
@@ -108,6 +139,7 @@ jobs:
needs:
- build-server
- build-web-selfhost
+ - build-admin-selfhost
- build-server-native
steps:
- uses: actions/checkout@v4
@@ -171,6 +203,12 @@ jobs:
name: selfhost-web
path: ./packages/frontend/web/dist
+ - name: Download selfhost admin artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: selfhost-admin
+ path: ./packages/frontend/admin/dist
+
- name: Install Node.js dependencies
run: |
yarn config set --json supportedArchitectures.cpu '["x64", "arm64", "arm"]'
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 32f1ca77c8..0d713347a1 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -61,11 +61,46 @@ jobs:
path: ./packages/frontend/web/dist
if-no-files-found: error
+ build-admin:
+ name: Build @affine/admin
+ runs-on: ubuntu-latest
+ environment: ${{ github.event.inputs.flavor }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup Version
+ id: version
+ uses: ./.github/actions/setup-version
+ - name: Setup Node.js
+ uses: ./.github/actions/setup-node
+ - name: Build Core
+ run: yarn nx build @affine/admin --skip-nx-cache
+ env:
+ R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
+ R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
+ R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
+ BUILD_TYPE: ${{ github.event.inputs.flavor }}
+ SHOULD_REPORT_TRACE: true
+ TRACE_REPORT_ENDPOINT: ${{ secrets.TRACE_REPORT_ENDPOINT }}
+ CAPTCHA_SITE_KEY: ${{ secrets.CAPTCHA_SITE_KEY }}
+ SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
+ SENTRY_PROJECT: 'affine-admin'
+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
+ PERFSEE_TOKEN: ${{ secrets.PERFSEE_TOKEN }}
+ MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
+ - name: Upload admin artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: admin
+ path: ./packages/frontend/admin/dist
+ if-no-files-found: error
+
build-frontend-image:
name: Build Frontend Image
runs-on: ubuntu-latest
needs:
- build-web
+ - build-admin
steps:
- uses: actions/checkout@v4
- name: Download web artifact
@@ -73,6 +108,11 @@ jobs:
with:
name: web
path: ./packages/frontend/web/dist
+ - name: Download admin artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: admin
+ path: ./packages/frontend/admin/dist
- name: Setup env
run: |
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
diff --git a/packages/backend/server/package.json b/packages/backend/server/package.json
index e94e4bb16c..5880a2ae99 100644
--- a/packages/backend/server/package.json
+++ b/packages/backend/server/package.json
@@ -15,7 +15,8 @@
"test:coverage": "c8 ava --concurrency 1 --serial",
"postinstall": "prisma generate",
"data-migration": "node --loader ts-node/esm/transpile-only.mjs ./src/data/index.ts",
- "predeploy": "yarn prisma migrate deploy && node --import ./scripts/register.js ./dist/data/index.js run"
+ "predeploy": "yarn prisma migrate deploy && node --import ./scripts/register.js ./dist/data/index.js run",
+ "predeploy:ts": "yarn prisma migrate deploy && node --loader ts-node/esm/transpile-only.mjs ./src/data/index.ts run"
},
"dependencies": {
"@apollo/server": "^4.10.2",
diff --git a/packages/backend/server/src/app.module.ts b/packages/backend/server/src/app.module.ts
index f0ff5b68c2..4a3915e985 100644
--- a/packages/backend/server/src/app.module.ts
+++ b/packages/backend/server/src/app.module.ts
@@ -177,6 +177,14 @@ function buildAppModule() {
config => config.isSelfhosted,
ServeStaticModule.forRoot({
rootPath: join('/app', 'static'),
+ exclude: ['/admin*'],
+ })
+ )
+ .useIf(
+ config => config.isSelfhosted,
+ ServeStaticModule.forRoot({
+ rootPath: join('/app', 'static', 'admin'),
+ serveRoot: '/admin',
})
);
diff --git a/packages/backend/server/src/index.ts b/packages/backend/server/src/index.ts
index d0d65a7db2..02e7d87d91 100644
--- a/packages/backend/server/src/index.ts
+++ b/packages/backend/server/src/index.ts
@@ -16,7 +16,7 @@ const logger = new Logger('App');
logger.log(`AFFiNE Server is running in [${AFFiNE.type}] mode`);
if (AFFiNE.node.dev) {
- logger.log('Startup Configration:');
+ logger.log('Startup Configuration:');
logger.log(omit(globalThis.AFFiNE, 'ENV_MAP'));
}
logger.log(`Listening on http://${listeningHost}:${AFFiNE.server.port}`);
diff --git a/packages/frontend/admin/components.json b/packages/frontend/admin/components.json
new file mode 100644
index 0000000000..b6b9529a7e
--- /dev/null
+++ b/packages/frontend/admin/components.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://ui.shadcn.com/schema.json",
+ "style": "default",
+ "rsc": false,
+ "tsx": true,
+ "tailwind": {
+ "config": "tailwind.config.js",
+ "css": "src/global.css",
+ "baseColor": "zinc",
+ "cssVariables": true,
+ "prefix": ""
+ },
+ "aliases": {
+ "components": "@affine/admin/components",
+ "utils": "@affine/admin/utils"
+ }
+}
diff --git a/packages/frontend/admin/package.json b/packages/frontend/admin/package.json
new file mode 100644
index 0000000000..54e243882a
--- /dev/null
+++ b/packages/frontend/admin/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "@affine/admin",
+ "version": "0.14.0",
+ "private": true,
+ "dependencies": {
+ "@affine/core": "workspace:*",
+ "@affine/graphql": "workspace:*",
+ "@hookform/resolvers": "^3.6.0",
+ "@radix-ui/react-accordion": "^1.1.2",
+ "@radix-ui/react-alert-dialog": "^1.0.5",
+ "@radix-ui/react-aspect-ratio": "^1.0.3",
+ "@radix-ui/react-avatar": "^1.0.4",
+ "@radix-ui/react-checkbox": "^1.0.4",
+ "@radix-ui/react-collapsible": "^1.0.3",
+ "@radix-ui/react-context-menu": "^2.1.5",
+ "@radix-ui/react-dialog": "^1.0.5",
+ "@radix-ui/react-dropdown-menu": "^2.0.6",
+ "@radix-ui/react-hover-card": "^1.0.7",
+ "@radix-ui/react-label": "^2.0.2",
+ "@radix-ui/react-menubar": "^1.0.4",
+ "@radix-ui/react-navigation-menu": "^1.1.4",
+ "@radix-ui/react-popover": "^1.0.7",
+ "@radix-ui/react-progress": "^1.0.3",
+ "@radix-ui/react-radio-group": "^1.1.3",
+ "@radix-ui/react-scroll-area": "^1.0.5",
+ "@radix-ui/react-select": "^2.0.0",
+ "@radix-ui/react-separator": "^1.0.3",
+ "@radix-ui/react-slider": "^1.1.2",
+ "@radix-ui/react-slot": "^1.0.2",
+ "@radix-ui/react-switch": "^1.0.3",
+ "@radix-ui/react-tabs": "^1.0.4",
+ "@radix-ui/react-toast": "^1.1.5",
+ "@radix-ui/react-toggle": "^1.0.3",
+ "@radix-ui/react-toggle-group": "^1.0.4",
+ "@radix-ui/react-tooltip": "^1.0.7",
+ "@sentry/react": "^8.9.0",
+ "cmdk": "^1.0.0",
+ "date-fns": "^3.6.0",
+ "embla-carousel-react": "^8.1.4",
+ "input-otp": "^1.2.4",
+ "lucide-react": "^0.394.0",
+ "next-themes": "^0.3.0",
+ "react": "^18.3.1",
+ "react-day-picker": "^8.10.1",
+ "react-dom": "^18.3.1",
+ "react-hook-form": "^7.51.5",
+ "react-resizable-panels": "^2.0.19",
+ "react-router-dom": "^6.23.1",
+ "sonner": "^1.5.0",
+ "vaul": "^0.9.1",
+ "zod": "^3.23.8"
+ },
+ "devDependencies": {
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.1.1",
+ "cross-env": "^7.0.3",
+ "shadcn-ui": "^0.8.0",
+ "tailwind-merge": "^2.3.0",
+ "tailwindcss": "^3.4.4",
+ "tailwindcss-animate": "^1.0.7"
+ },
+ "scripts": {
+ "build": "cross-env DISTRIBUTION=admin yarn workspace @affine/cli build",
+ "update-shadcn": "shadcn-ui add -p src/components/ui"
+ },
+ "exports": {
+ "./utils": "./src/utils.ts",
+ "./components/ui/*": "./src/components/ui/*.tsx"
+ }
+}
diff --git a/packages/frontend/admin/src/app.tsx b/packages/frontend/admin/src/app.tsx
new file mode 100644
index 0000000000..75c34c19ab
--- /dev/null
+++ b/packages/frontend/admin/src/app.tsx
@@ -0,0 +1,72 @@
+import { Toaster } from '@affine/admin/components/ui/sonner';
+import { Telemetry } from '@affine/core/telemetry';
+import { wrapCreateBrowserRouter } from '@sentry/react';
+import { useEffect } from 'react';
+import {
+ createBrowserRouter as reactRouterCreateBrowserRouter,
+ RouterProvider,
+ useLocation,
+ useNavigate,
+} from 'react-router-dom';
+
+import { TooltipProvider } from './components/ui/tooltip';
+
+const createBrowserRouter = wrapCreateBrowserRouter(
+ reactRouterCreateBrowserRouter
+);
+
+const _createBrowserRouter = window.SENTRY_RELEASE
+ ? createBrowserRouter
+ : reactRouterCreateBrowserRouter;
+
+const Redirect = function Redirect() {
+ const location = useLocation();
+ const navigate = useNavigate();
+ useEffect(() => {
+ if (!location.pathname.startsWith('/admin')) {
+ navigate('/admin', { replace: true });
+ }
+ }, [location, navigate]);
+ return null;
+};
+
+export const router = _createBrowserRouter(
+ [
+ {
+ path: '/',
+ element: <Redirect />,
+ },
+ {
+ path: '/admin',
+ children: [
+ {
+ path: '',
+ lazy: () => import('./modules/home'),
+ },
+ {
+ path: '/admin/auth',
+ lazy: () => import('./modules/auth'),
+ },
+ {
+ path: '/admin/users',
+ lazy: () => import('./modules/users'),
+ },
+ ],
+ },
+ ],
+ {
+ future: {
+ v7_normalizeFormMethod: true,
+ },
+ }
+);
+
+export const App = () => {
+ return (
+ <TooltipProvider>
+ <Telemetry />
+ <RouterProvider router={router} />
+ <Toaster />
+ </TooltipProvider>
+ );
+};
diff --git a/packages/frontend/admin/src/components/ui/accordion.tsx b/packages/frontend/admin/src/components/ui/accordion.tsx
new file mode 100644
index 0000000000..c2b0b9e5eb
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/accordion.tsx
@@ -0,0 +1,55 @@
+import { cn } from '@affine/admin/utils';
+import * as AccordionPrimitive from '@radix-ui/react-accordion';
+import { ChevronDown } from 'lucide-react';
+import * as React from 'react';
+
+const Accordion = AccordionPrimitive.Root;
+
+const AccordionItem = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
+>(({ className, ...props }, ref) => (
+ <AccordionPrimitive.Item
+ ref={ref}
+ className={cn('border-b', className)}
+ {...props}
+ />
+));
+AccordionItem.displayName = 'AccordionItem';
+
+const AccordionTrigger = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
+>(({ className, children, ...props }, ref) => (
+ <AccordionPrimitive.Header className="flex">
+ <AccordionPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ 'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
+ </AccordionPrimitive.Trigger>
+ </AccordionPrimitive.Header>
+));
+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
+
+const AccordionContent = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
+>(({ className, children, ...props }, ref) => (
+ <AccordionPrimitive.Content
+ ref={ref}
+ className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
+ {...props}
+ >
+ <div className={cn('pb-4 pt-0', className)}>{children}</div>
+ </AccordionPrimitive.Content>
+));
+
+AccordionContent.displayName = AccordionPrimitive.Content.displayName;
+
+export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
diff --git a/packages/frontend/admin/src/components/ui/alert-dialog.tsx b/packages/frontend/admin/src/components/ui/alert-dialog.tsx
new file mode 100644
index 0000000000..3fd0b60dc8
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/alert-dialog.tsx
@@ -0,0 +1,138 @@
+import { buttonVariants } from '@affine/admin/components/ui/button';
+import { cn } from '@affine/admin/utils';
+import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
+import * as React from 'react';
+
+const AlertDialog = AlertDialogPrimitive.Root;
+
+const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
+
+const AlertDialogPortal = AlertDialogPrimitive.Portal;
+
+const AlertDialogOverlay = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Overlay
+ className={cn(
+ 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
+ className
+ )}
+ {...props}
+ ref={ref}
+ />
+));
+AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
+
+const AlertDialogContent = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPortal>
+ <AlertDialogOverlay />
+ <AlertDialogPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
+ className
+ )}
+ {...props}
+ />
+ </AlertDialogPortal>
+));
+AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
+
+const AlertDialogHeader = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col space-y-2 text-center sm:text-left',
+ className
+ )}
+ {...props}
+ />
+);
+AlertDialogHeader.displayName = 'AlertDialogHeader';
+
+const AlertDialogFooter = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
+ className
+ )}
+ {...props}
+ />
+);
+AlertDialogFooter.displayName = 'AlertDialogFooter';
+
+const AlertDialogTitle = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Title>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Title
+ ref={ref}
+ className={cn('text-lg font-semibold', className)}
+ {...props}
+ />
+));
+AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
+
+const AlertDialogDescription = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Description>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Description
+ ref={ref}
+ className={cn('text-sm text-muted-foreground', className)}
+ {...props}
+ />
+));
+AlertDialogDescription.displayName =
+ AlertDialogPrimitive.Description.displayName;
+
+const AlertDialogAction = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Action>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Action
+ ref={ref}
+ className={cn(buttonVariants(), className)}
+ {...props}
+ />
+));
+AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
+
+const AlertDialogCancel = React.forwardRef<
+ React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
+>(({ className, ...props }, ref) => (
+ <AlertDialogPrimitive.Cancel
+ ref={ref}
+ className={cn(
+ buttonVariants({ variant: 'outline' }),
+ 'mt-2 sm:mt-0',
+ className
+ )}
+ {...props}
+ />
+));
+AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
+
+export {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogOverlay,
+ AlertDialogPortal,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+};
diff --git a/packages/frontend/admin/src/components/ui/alert.tsx b/packages/frontend/admin/src/components/ui/alert.tsx
new file mode 100644
index 0000000000..97caed1cc6
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/alert.tsx
@@ -0,0 +1,58 @@
+import { cn } from '@affine/admin/utils';
+import { cva, type VariantProps } from 'class-variance-authority';
+import * as React from 'react';
+
+const alertVariants = cva(
+ 'relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
+ {
+ variants: {
+ variant: {
+ default: 'bg-background text-foreground',
+ destructive:
+ 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ },
+ }
+);
+
+const Alert = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
+>(({ className, variant, ...props }, ref) => (
+ <div
+ ref={ref}
+ role="alert"
+ className={cn(alertVariants({ variant }), className)}
+ {...props}
+ />
+));
+Alert.displayName = 'Alert';
+
+const AlertTitle = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLHeadingElement>
+>(({ className, ...props }, ref) => (
+ <h5
+ ref={ref}
+ className={cn('mb-1 font-medium leading-none tracking-tight', className)}
+ {...props}
+ />
+));
+AlertTitle.displayName = 'AlertTitle';
+
+const AlertDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn('text-sm [&_p]:leading-relaxed', className)}
+ {...props}
+ />
+));
+AlertDescription.displayName = 'AlertDescription';
+
+export { Alert, AlertDescription, AlertTitle };
diff --git a/packages/frontend/admin/src/components/ui/aspect-ratio.tsx b/packages/frontend/admin/src/components/ui/aspect-ratio.tsx
new file mode 100644
index 0000000000..5dfdf1e67a
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/aspect-ratio.tsx
@@ -0,0 +1,5 @@
+import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
+
+const AspectRatio = AspectRatioPrimitive.Root;
+
+export { AspectRatio };
diff --git a/packages/frontend/admin/src/components/ui/avatar.tsx b/packages/frontend/admin/src/components/ui/avatar.tsx
new file mode 100644
index 0000000000..a0f5256511
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/avatar.tsx
@@ -0,0 +1,47 @@
+import { cn } from '@affine/admin/utils';
+import * as AvatarPrimitive from '@radix-ui/react-avatar';
+import * as React from 'react';
+
+const Avatar = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Root
+ ref={ref}
+ className={cn(
+ 'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
+ className
+ )}
+ {...props}
+ />
+));
+Avatar.displayName = AvatarPrimitive.Root.displayName;
+
+const AvatarImage = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Image>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Image
+ ref={ref}
+ className={cn('aspect-square h-full w-full', className)}
+ {...props}
+ />
+));
+AvatarImage.displayName = AvatarPrimitive.Image.displayName;
+
+const AvatarFallback = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Fallback>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Fallback
+ ref={ref}
+ className={cn(
+ 'flex h-full w-full items-center justify-center rounded-full bg-muted',
+ className
+ )}
+ {...props}
+ />
+));
+AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
+
+export { Avatar, AvatarFallback, AvatarImage };
diff --git a/packages/frontend/admin/src/components/ui/badge.tsx b/packages/frontend/admin/src/components/ui/badge.tsx
new file mode 100644
index 0000000000..9e8cf4011e
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/badge.tsx
@@ -0,0 +1,35 @@
+import { cn } from '@affine/admin/utils';
+import { cva, type VariantProps } from 'class-variance-authority';
+import type * as React from 'react';
+
+const badgeVariants = cva(
+ 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
+ {
+ variants: {
+ variant: {
+ default:
+ 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
+ secondary:
+ 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
+ destructive:
+ 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
+ outline: 'text-foreground',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ },
+ }
+);
+
+export interface BadgeProps
+ extends React.HTMLAttributes<HTMLDivElement>,
+ VariantProps<typeof badgeVariants> {}
+
+function Badge({ className, variant, ...props }: BadgeProps) {
+ return (
+ <div className={cn(badgeVariants({ variant }), className)} {...props} />
+ );
+}
+
+export { Badge, badgeVariants };
diff --git a/packages/frontend/admin/src/components/ui/breadcrumb.tsx b/packages/frontend/admin/src/components/ui/breadcrumb.tsx
new file mode 100644
index 0000000000..0d973e60a4
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/breadcrumb.tsx
@@ -0,0 +1,114 @@
+import { cn } from '@affine/admin/utils';
+import { Slot } from '@radix-ui/react-slot';
+import { ChevronRight, MoreHorizontal } from 'lucide-react';
+import * as React from 'react';
+
+const Breadcrumb = React.forwardRef<
+ HTMLElement,
+ React.ComponentPropsWithoutRef<'nav'> & {
+ separator?: React.ReactNode;
+ }
+>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
+Breadcrumb.displayName = 'Breadcrumb';
+
+const BreadcrumbList = React.forwardRef<
+ HTMLOListElement,
+ React.ComponentPropsWithoutRef<'ol'>
+>(({ className, ...props }, ref) => (
+ <ol
+ ref={ref}
+ className={cn(
+ 'flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5',
+ className
+ )}
+ {...props}
+ />
+));
+BreadcrumbList.displayName = 'BreadcrumbList';
+
+const BreadcrumbItem = React.forwardRef<
+ HTMLLIElement,
+ React.ComponentPropsWithoutRef<'li'>
+>(({ className, ...props }, ref) => (
+ <li
+ ref={ref}
+ className={cn('inline-flex items-center gap-1.5', className)}
+ {...props}
+ />
+));
+BreadcrumbItem.displayName = 'BreadcrumbItem';
+
+const BreadcrumbLink = React.forwardRef<
+ HTMLAnchorElement,
+ React.ComponentPropsWithoutRef<'a'> & {
+ asChild?: boolean;
+ }
+>(({ asChild, className, ...props }, ref) => {
+ const Comp = asChild ? Slot : 'a';
+
+ return (
+ <Comp
+ ref={ref}
+ className={cn('transition-colors hover:text-foreground', className)}
+ {...props}
+ />
+ );
+});
+BreadcrumbLink.displayName = 'BreadcrumbLink';
+
+const BreadcrumbPage = React.forwardRef<
+ HTMLSpanElement,
+ React.ComponentPropsWithoutRef<'span'>
+>(({ className, ...props }, ref) => (
+ <span
+ ref={ref}
+ role="link"
+ aria-disabled="true"
+ aria-current="page"
+ className={cn('font-normal text-foreground', className)}
+ {...props}
+ />
+));
+BreadcrumbPage.displayName = 'BreadcrumbPage';
+
+const BreadcrumbSeparator = ({
+ children,
+ className,
+ ...props
+}: React.ComponentProps<'li'>) => (
+ <li
+ role="presentation"
+ aria-hidden="true"
+ className={cn('[&>svg]:size-3.5', className)}
+ {...props}
+ >
+ {children ?? <ChevronRight />}
+ </li>
+);
+BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
+
+const BreadcrumbEllipsis = ({
+ className,
+ ...props
+}: React.ComponentProps<'span'>) => (
+ <span
+ role="presentation"
+ aria-hidden="true"
+ className={cn('flex h-9 w-9 items-center justify-center', className)}
+ {...props}
+ >
+ <MoreHorizontal className="h-4 w-4" />
+ <span className="sr-only">More</span>
+ </span>
+);
+BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis';
+
+export {
+ Breadcrumb,
+ BreadcrumbEllipsis,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbList,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+};
diff --git a/packages/frontend/admin/src/components/ui/button.tsx b/packages/frontend/admin/src/components/ui/button.tsx
new file mode 100644
index 0000000000..fa1b8f1781
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/button.tsx
@@ -0,0 +1,55 @@
+import { cn } from '@affine/admin/utils';
+import { Slot } from '@radix-ui/react-slot';
+import { cva, type VariantProps } from 'class-variance-authority';
+import * as React from 'react';
+
+const buttonVariants = cva(
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
+ {
+ variants: {
+ variant: {
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
+ destructive:
+ 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
+ outline:
+ 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
+ secondary:
+ 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
+ link: 'text-primary underline-offset-4 hover:underline',
+ },
+ size: {
+ default: 'h-10 px-4 py-2',
+ sm: 'h-9 rounded-md px-3',
+ lg: 'h-11 rounded-md px-8',
+ icon: 'h-10 w-10',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ size: 'default',
+ },
+ }
+);
+
+export interface ButtonProps
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>,
+ VariantProps<typeof buttonVariants> {
+ asChild?: boolean;
+}
+
+const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
+ const Comp = asChild ? Slot : 'button';
+ return (
+ <Comp
+ className={cn(buttonVariants({ variant, size, className }))}
+ ref={ref}
+ {...props}
+ />
+ );
+ }
+);
+Button.displayName = 'Button';
+
+export { Button, buttonVariants };
diff --git a/packages/frontend/admin/src/components/ui/calendar.tsx b/packages/frontend/admin/src/components/ui/calendar.tsx
new file mode 100644
index 0000000000..236019a088
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/calendar.tsx
@@ -0,0 +1,63 @@
+import { buttonVariants } from '@affine/admin/components/ui/button';
+import { cn } from '@affine/admin/utils';
+import { ChevronLeft, ChevronRight } from 'lucide-react';
+import type * as React from 'react';
+import { DayPicker } from 'react-day-picker';
+
+export type CalendarProps = React.ComponentProps<typeof DayPicker>;
+
+function Calendar({
+ className,
+ classNames,
+ showOutsideDays = true,
+ ...props
+}: CalendarProps) {
+ return (
+ <DayPicker
+ showOutsideDays={showOutsideDays}
+ className={cn('p-3', className)}
+ classNames={{
+ months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',
+ month: 'space-y-4',
+ caption: 'flex justify-center pt-1 relative items-center',
+ caption_label: 'text-sm font-medium',
+ nav: 'space-x-1 flex items-center',
+ nav_button: cn(
+ buttonVariants({ variant: 'outline' }),
+ 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100'
+ ),
+ nav_button_previous: 'absolute left-1',
+ nav_button_next: 'absolute right-1',
+ table: 'w-full border-collapse space-y-1',
+ head_row: 'flex',
+ head_cell:
+ 'text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]',
+ row: 'flex w-full mt-2',
+ cell: 'h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20',
+ day: cn(
+ buttonVariants({ variant: 'ghost' }),
+ 'h-9 w-9 p-0 font-normal aria-selected:opacity-100'
+ ),
+ day_range_end: 'day-range-end',
+ day_selected:
+ 'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground',
+ day_today: 'bg-accent text-accent-foreground',
+ day_outside:
+ 'day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30',
+ day_disabled: 'text-muted-foreground opacity-50',
+ day_range_middle:
+ 'aria-selected:bg-accent aria-selected:text-accent-foreground',
+ day_hidden: 'invisible',
+ ...classNames,
+ }}
+ components={{
+ IconLeft: () => <ChevronLeft className="h-4 w-4" />,
+ IconRight: () => <ChevronRight className="h-4 w-4" />,
+ }}
+ {...props}
+ />
+ );
+}
+Calendar.displayName = 'Calendar';
+
+export { Calendar };
diff --git a/packages/frontend/admin/src/components/ui/card.tsx b/packages/frontend/admin/src/components/ui/card.tsx
new file mode 100644
index 0000000000..ae1d797f5f
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/card.tsx
@@ -0,0 +1,85 @@
+import { cn } from '@affine/admin/utils';
+import * as React from 'react';
+
+const Card = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn(
+ 'rounded-lg border bg-card text-card-foreground shadow-sm',
+ className
+ )}
+ {...props}
+ />
+));
+Card.displayName = 'Card';
+
+const CardHeader = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn('flex flex-col space-y-1.5 p-6', className)}
+ {...props}
+ />
+));
+CardHeader.displayName = 'CardHeader';
+
+const CardTitle = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLHeadingElement>
+>(({ className, ...props }, ref) => (
+ <h3
+ ref={ref}
+ className={cn(
+ 'text-2xl font-semibold leading-none tracking-tight',
+ className
+ )}
+ {...props}
+ />
+));
+CardTitle.displayName = 'CardTitle';
+
+const CardDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <p
+ ref={ref}
+ className={cn('text-sm text-muted-foreground', className)}
+ {...props}
+ />
+));
+CardDescription.displayName = 'CardDescription';
+
+const CardContent = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />
+));
+CardContent.displayName = 'CardContent';
+
+const CardFooter = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn('flex items-center p-6 pt-0', className)}
+ {...props}
+ />
+));
+CardFooter.displayName = 'CardFooter';
+
+export {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+};
diff --git a/packages/frontend/admin/src/components/ui/carousel.tsx b/packages/frontend/admin/src/components/ui/carousel.tsx
new file mode 100644
index 0000000000..f085bf0150
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/carousel.tsx
@@ -0,0 +1,259 @@
+import { Button } from '@affine/admin/components/ui/button';
+import { cn } from '@affine/admin/utils';
+import useEmblaCarousel, {
+ type UseEmblaCarouselType,
+} from 'embla-carousel-react';
+import { ArrowLeft, ArrowRight } from 'lucide-react';
+import * as React from 'react';
+
+type CarouselApi = UseEmblaCarouselType[1];
+type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
+type CarouselOptions = UseCarouselParameters[0];
+type CarouselPlugin = UseCarouselParameters[1];
+
+type CarouselProps = {
+ opts?: CarouselOptions;
+ plugins?: CarouselPlugin;
+ orientation?: 'horizontal' | 'vertical';
+ setApi?: (api: CarouselApi) => void;
+};
+
+type CarouselContextProps = {
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0];
+ api: ReturnType<typeof useEmblaCarousel>[1];
+ scrollPrev: () => void;
+ scrollNext: () => void;
+ canScrollPrev: boolean;
+ canScrollNext: boolean;
+} & CarouselProps;
+
+const CarouselContext = React.createContext<CarouselContextProps | null>(null);
+
+function useCarousel() {
+ const context = React.useContext(CarouselContext);
+
+ if (!context) {
+ throw new Error('useCarousel must be used within a <Carousel />');
+ }
+
+ return context;
+}
+
+const Carousel = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement> & CarouselProps
+>(
+ (
+ {
+ orientation = 'horizontal',
+ opts,
+ setApi,
+ plugins,
+ className,
+ children,
+ ...props
+ },
+ ref
+ ) => {
+ const [carouselRef, api] = useEmblaCarousel(
+ {
+ ...opts,
+ axis: orientation === 'horizontal' ? 'x' : 'y',
+ },
+ plugins
+ );
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
+
+ const onSelect = React.useCallback((api: CarouselApi) => {
+ if (!api) {
+ return;
+ }
+
+ setCanScrollPrev(api.canScrollPrev());
+ setCanScrollNext(api.canScrollNext());
+ }, []);
+
+ const scrollPrev = React.useCallback(() => {
+ api?.scrollPrev();
+ }, [api]);
+
+ const scrollNext = React.useCallback(() => {
+ api?.scrollNext();
+ }, [api]);
+
+ const handleKeyDown = React.useCallback(
+ (event: React.KeyboardEvent<HTMLDivElement>) => {
+ if (event.key === 'ArrowLeft') {
+ event.preventDefault();
+ scrollPrev();
+ } else if (event.key === 'ArrowRight') {
+ event.preventDefault();
+ scrollNext();
+ }
+ },
+ [scrollPrev, scrollNext]
+ );
+
+ React.useEffect(() => {
+ if (!api || !setApi) {
+ return;
+ }
+
+ setApi(api);
+ }, [api, setApi]);
+
+ React.useEffect(() => {
+ if (!api) {
+ return;
+ }
+
+ onSelect(api);
+ api.on('reInit', onSelect);
+ api.on('select', onSelect);
+
+ return () => {
+ api?.off('select', onSelect);
+ };
+ }, [api, onSelect]);
+
+ return (
+ <CarouselContext.Provider
+ value={{
+ carouselRef,
+ api: api,
+ opts,
+ orientation:
+ orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),
+ scrollPrev,
+ scrollNext,
+ canScrollPrev,
+ canScrollNext,
+ }}
+ >
+ <div
+ ref={ref}
+ onKeyDownCapture={handleKeyDown}
+ className={cn('relative', className)}
+ role="region"
+ aria-roledescription="carousel"
+ {...props}
+ >
+ {children}
+ </div>
+ </CarouselContext.Provider>
+ );
+ }
+);
+Carousel.displayName = 'Carousel';
+
+const CarouselContent = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => {
+ const { carouselRef, orientation } = useCarousel();
+
+ return (
+ <div ref={carouselRef} className="overflow-hidden">
+ <div
+ ref={ref}
+ className={cn(
+ 'flex',
+ orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',
+ className
+ )}
+ {...props}
+ />
+ </div>
+ );
+});
+CarouselContent.displayName = 'CarouselContent';
+
+const CarouselItem = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => {
+ const { orientation } = useCarousel();
+
+ return (
+ <div
+ ref={ref}
+ role="group"
+ aria-roledescription="slide"
+ className={cn(
+ 'min-w-0 shrink-0 grow-0 basis-full',
+ orientation === 'horizontal' ? 'pl-4' : 'pt-4',
+ className
+ )}
+ {...props}
+ />
+ );
+});
+CarouselItem.displayName = 'CarouselItem';
+
+const CarouselPrevious = React.forwardRef<
+ HTMLButtonElement,
+ React.ComponentProps<typeof Button>
+>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
+
+ return (
+ <Button
+ ref={ref}
+ variant={variant}
+ size={size}
+ className={cn(
+ 'absolute h-8 w-8 rounded-full',
+ orientation === 'horizontal'
+ ? '-left-12 top-1/2 -translate-y-1/2'
+ : '-top-12 left-1/2 -translate-x-1/2 rotate-90',
+ className
+ )}
+ disabled={!canScrollPrev}
+ onClick={scrollPrev}
+ {...props}
+ >
+ <ArrowLeft className="h-4 w-4" />
+ <span className="sr-only">Previous slide</span>
+ </Button>
+ );
+});
+CarouselPrevious.displayName = 'CarouselPrevious';
+
+const CarouselNext = React.forwardRef<
+ HTMLButtonElement,
+ React.ComponentProps<typeof Button>
+>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
+
+ return (
+ <Button
+ ref={ref}
+ variant={variant}
+ size={size}
+ className={cn(
+ 'absolute h-8 w-8 rounded-full',
+ orientation === 'horizontal'
+ ? '-right-12 top-1/2 -translate-y-1/2'
+ : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
+ className
+ )}
+ disabled={!canScrollNext}
+ onClick={scrollNext}
+ {...props}
+ >
+ <ArrowRight className="h-4 w-4" />
+ <span className="sr-only">Next slide</span>
+ </Button>
+ );
+});
+CarouselNext.displayName = 'CarouselNext';
+
+export {
+ Carousel,
+ type CarouselApi,
+ CarouselContent,
+ CarouselItem,
+ CarouselNext,
+ CarouselPrevious,
+};
diff --git a/packages/frontend/admin/src/components/ui/checkbox.tsx b/packages/frontend/admin/src/components/ui/checkbox.tsx
new file mode 100644
index 0000000000..eed1b93942
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/checkbox.tsx
@@ -0,0 +1,27 @@
+import { cn } from '@affine/admin/utils';
+import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
+import { Check } from 'lucide-react';
+import * as React from 'react';
+
+const Checkbox = React.forwardRef<
+ React.ElementRef<typeof CheckboxPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
+>(({ className, ...props }, ref) => (
+ <CheckboxPrimitive.Root
+ ref={ref}
+ className={cn(
+ 'peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
+ className
+ )}
+ {...props}
+ >
+ <CheckboxPrimitive.Indicator
+ className={cn('flex items-center justify-center text-current')}
+ >
+ <Check className="h-4 w-4" />
+ </CheckboxPrimitive.Indicator>
+ </CheckboxPrimitive.Root>
+));
+Checkbox.displayName = CheckboxPrimitive.Root.displayName;
+
+export { Checkbox };
diff --git a/packages/frontend/admin/src/components/ui/collapsible.tsx b/packages/frontend/admin/src/components/ui/collapsible.tsx
new file mode 100644
index 0000000000..6105fb47a0
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/collapsible.tsx
@@ -0,0 +1,9 @@
+import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
+
+const Collapsible = CollapsiblePrimitive.Root;
+
+const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
+
+const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
+
+export { Collapsible, CollapsibleContent, CollapsibleTrigger };
diff --git a/packages/frontend/admin/src/components/ui/command.tsx b/packages/frontend/admin/src/components/ui/command.tsx
new file mode 100644
index 0000000000..97ac224495
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/command.tsx
@@ -0,0 +1,153 @@
+import { Dialog, DialogContent } from '@affine/admin/components/ui/dialog';
+import { cn } from '@affine/admin/utils';
+import { type DialogProps } from '@radix-ui/react-dialog';
+import { Command as CommandPrimitive } from 'cmdk';
+import { Search } from 'lucide-react';
+import * as React from 'react';
+
+const Command = React.forwardRef<
+ React.ElementRef<typeof CommandPrimitive>,
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive>
+>(({ className, ...props }, ref) => (
+ <CommandPrimitive
+ ref={ref}
+ className={cn(
+ 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',
+ className
+ )}
+ {...props}
+ />
+));
+Command.displayName = CommandPrimitive.displayName;
+
+interface CommandDialogProps extends DialogProps {}
+
+const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
+ return (
+ <Dialog {...props}>
+ <DialogContent className="overflow-hidden p-0 shadow-lg">
+ <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
+ {children}
+ </Command>
+ </DialogContent>
+ </Dialog>
+ );
+};
+
+const CommandInput = React.forwardRef<
+ React.ElementRef<typeof CommandPrimitive.Input>,
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
+>(({ className, ...props }, ref) => (
+ // eslint-disable-next-line react/no-unknown-property
+ <div className="flex items-center border-b px-3" cmdk-input-wrapper="">
+ <Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
+ <CommandPrimitive.Input
+ ref={ref}
+ className={cn(
+ 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
+ className
+ )}
+ {...props}
+ />
+ </div>
+));
+
+CommandInput.displayName = CommandPrimitive.Input.displayName;
+
+const CommandList = React.forwardRef<
+ React.ElementRef<typeof CommandPrimitive.List>,
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
+>(({ className, ...props }, ref) => (
+ <CommandPrimitive.List
+ ref={ref}
+ className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}
+ {...props}
+ />
+));
+
+CommandList.displayName = CommandPrimitive.List.displayName;
+
+const CommandEmpty = React.forwardRef<
+ React.ElementRef<typeof CommandPrimitive.Empty>,
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
+>((props, ref) => (
+ <CommandPrimitive.Empty
+ ref={ref}
+ className="py-6 text-center text-sm"
+ {...props}
+ />
+));
+
+CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
+
+const CommandGroup = React.forwardRef<
+ React.ElementRef<typeof CommandPrimitive.Group>,
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
+>(({ className, ...props }, ref) => (
+ <CommandPrimitive.Group
+ ref={ref}
+ className={cn(
+ 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',
+ className
+ )}
+ {...props}
+ />
+));
+
+CommandGroup.displayName = CommandPrimitive.Group.displayName;
+
+const CommandSeparator = React.forwardRef<
+ React.ElementRef<typeof CommandPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <CommandPrimitive.Separator
+ ref={ref}
+ className={cn('-mx-1 h-px bg-border', className)}
+ {...props}
+ />
+));
+CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
+
+const CommandItem = React.forwardRef<
+ React.ElementRef<typeof CommandPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
+>(({ className, ...props }, ref) => (
+ <CommandPrimitive.Item
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50',
+ className
+ )}
+ {...props}
+ />
+));
+
+CommandItem.displayName = CommandPrimitive.Item.displayName;
+
+const CommandShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLSpanElement>) => {
+ return (
+ <span
+ className={cn(
+ 'ml-auto text-xs tracking-widest text-muted-foreground',
+ className
+ )}
+ {...props}
+ />
+ );
+};
+CommandShortcut.displayName = 'CommandShortcut';
+
+export {
+ Command,
+ CommandDialog,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+ CommandSeparator,
+ CommandShortcut,
+};
diff --git a/packages/frontend/admin/src/components/ui/context-menu.tsx b/packages/frontend/admin/src/components/ui/context-menu.tsx
new file mode 100644
index 0000000000..cbe63f209f
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/context-menu.tsx
@@ -0,0 +1,197 @@
+import { cn } from '@affine/admin/utils';
+import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
+import { Check, ChevronRight, Circle } from 'lucide-react';
+import * as React from 'react';
+
+const ContextMenu = ContextMenuPrimitive.Root;
+
+const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
+
+const ContextMenuGroup = ContextMenuPrimitive.Group;
+
+const ContextMenuPortal = ContextMenuPrimitive.Portal;
+
+const ContextMenuSub = ContextMenuPrimitive.Sub;
+
+const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
+
+const ContextMenuSubTrigger = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
+ inset?: boolean;
+ }
+>(({ className, inset, children, ...props }, ref) => (
+ <ContextMenuPrimitive.SubTrigger
+ ref={ref}
+ className={cn(
+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronRight className="ml-auto h-4 w-4" />
+ </ContextMenuPrimitive.SubTrigger>
+));
+ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
+
+const ContextMenuSubContent = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
+>(({ className, ...props }, ref) => (
+ <ContextMenuPrimitive.SubContent
+ ref={ref}
+ className={cn(
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+));
+ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
+
+const ContextMenuContent = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <ContextMenuPrimitive.Portal>
+ <ContextMenuPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+ </ContextMenuPrimitive.Portal>
+));
+ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
+
+const ContextMenuItem = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
+ inset?: boolean;
+ }
+>(({ className, inset, ...props }, ref) => (
+ <ContextMenuPrimitive.Item
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ />
+));
+ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
+
+const ContextMenuCheckboxItem = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>
+>(({ className, children, checked, ...props }, ref) => (
+ <ContextMenuPrimitive.CheckboxItem
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ checked={checked}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <ContextMenuPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </ContextMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </ContextMenuPrimitive.CheckboxItem>
+));
+ContextMenuCheckboxItem.displayName =
+ ContextMenuPrimitive.CheckboxItem.displayName;
+
+const ContextMenuRadioItem = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>
+>(({ className, children, ...props }, ref) => (
+ <ContextMenuPrimitive.RadioItem
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <ContextMenuPrimitive.ItemIndicator>
+ <Circle className="h-2 w-2 fill-current" />
+ </ContextMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </ContextMenuPrimitive.RadioItem>
+));
+ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
+
+const ContextMenuLabel = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
+ inset?: boolean;
+ }
+>(({ className, inset, ...props }, ref) => (
+ <ContextMenuPrimitive.Label
+ ref={ref}
+ className={cn(
+ 'px-2 py-1.5 text-sm font-semibold text-foreground',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ />
+));
+ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
+
+const ContextMenuSeparator = React.forwardRef<
+ React.ElementRef<typeof ContextMenuPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <ContextMenuPrimitive.Separator
+ ref={ref}
+ className={cn('-mx-1 my-1 h-px bg-border', className)}
+ {...props}
+ />
+));
+ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
+
+const ContextMenuShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLSpanElement>) => {
+ return (
+ <span
+ className={cn(
+ 'ml-auto text-xs tracking-widest text-muted-foreground',
+ className
+ )}
+ {...props}
+ />
+ );
+};
+ContextMenuShortcut.displayName = 'ContextMenuShortcut';
+
+export {
+ ContextMenu,
+ ContextMenuCheckboxItem,
+ ContextMenuContent,
+ ContextMenuGroup,
+ ContextMenuItem,
+ ContextMenuLabel,
+ ContextMenuPortal,
+ ContextMenuRadioGroup,
+ ContextMenuRadioItem,
+ ContextMenuSeparator,
+ ContextMenuShortcut,
+ ContextMenuSub,
+ ContextMenuSubContent,
+ ContextMenuSubTrigger,
+ ContextMenuTrigger,
+};
diff --git a/packages/frontend/admin/src/components/ui/dialog.tsx b/packages/frontend/admin/src/components/ui/dialog.tsx
new file mode 100644
index 0000000000..c60b4f6c37
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/dialog.tsx
@@ -0,0 +1,119 @@
+import { cn } from '@affine/admin/utils';
+import * as DialogPrimitive from '@radix-ui/react-dialog';
+import { X } from 'lucide-react';
+import * as React from 'react';
+
+const Dialog = DialogPrimitive.Root;
+
+const DialogTrigger = DialogPrimitive.Trigger;
+
+const DialogPortal = DialogPrimitive.Portal;
+
+const DialogClose = DialogPrimitive.Close;
+
+const DialogOverlay = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Overlay>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
+>(({ className, ...props }, ref) => (
+ <DialogPrimitive.Overlay
+ ref={ref}
+ className={cn(
+ 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
+ className
+ )}
+ {...props}
+ />
+));
+DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
+
+const DialogContent = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
+>(({ className, children, ...props }, ref) => (
+ <DialogPortal>
+ <DialogOverlay />
+ <DialogPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
+ <X className="h-4 w-4" />
+ <span className="sr-only">Close</span>
+ </DialogPrimitive.Close>
+ </DialogPrimitive.Content>
+ </DialogPortal>
+));
+DialogContent.displayName = DialogPrimitive.Content.displayName;
+
+const DialogHeader = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col space-y-1.5 text-center sm:text-left',
+ className
+ )}
+ {...props}
+ />
+);
+DialogHeader.displayName = 'DialogHeader';
+
+const DialogFooter = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
+ className
+ )}
+ {...props}
+ />
+);
+DialogFooter.displayName = 'DialogFooter';
+
+const DialogTitle = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Title>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
+>(({ className, ...props }, ref) => (
+ <DialogPrimitive.Title
+ ref={ref}
+ className={cn(
+ 'text-lg font-semibold leading-none tracking-tight',
+ className
+ )}
+ {...props}
+ />
+));
+DialogTitle.displayName = DialogPrimitive.Title.displayName;
+
+const DialogDescription = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Description>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
+>(({ className, ...props }, ref) => (
+ <DialogPrimitive.Description
+ ref={ref}
+ className={cn('text-sm text-muted-foreground', className)}
+ {...props}
+ />
+));
+DialogDescription.displayName = DialogPrimitive.Description.displayName;
+
+export {
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogOverlay,
+ DialogPortal,
+ DialogTitle,
+ DialogTrigger,
+};
diff --git a/packages/frontend/admin/src/components/ui/drawer.tsx b/packages/frontend/admin/src/components/ui/drawer.tsx
new file mode 100644
index 0000000000..fcc5fc5923
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/drawer.tsx
@@ -0,0 +1,115 @@
+import { cn } from '@affine/admin/utils';
+import * as React from 'react';
+import { Drawer as DrawerPrimitive } from 'vaul';
+
+const Drawer = ({
+ shouldScaleBackground = true,
+ ...props
+}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
+ <DrawerPrimitive.Root
+ shouldScaleBackground={shouldScaleBackground}
+ {...props}
+ />
+);
+Drawer.displayName = 'Drawer';
+
+const DrawerTrigger = DrawerPrimitive.Trigger;
+
+const DrawerPortal = DrawerPrimitive.Portal;
+
+const DrawerClose = DrawerPrimitive.Close;
+
+const DrawerOverlay = React.forwardRef<
+ React.ElementRef<typeof DrawerPrimitive.Overlay>,
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
+>(({ className, ...props }, ref) => (
+ <DrawerPrimitive.Overlay
+ ref={ref}
+ className={cn('fixed inset-0 z-50 bg-black/80', className)}
+ {...props}
+ />
+));
+DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
+
+const DrawerContent = React.forwardRef<
+ React.ElementRef<typeof DrawerPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
+>(({ className, children, ...props }, ref) => (
+ <DrawerPortal>
+ <DrawerOverlay />
+ <DrawerPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background',
+ className
+ )}
+ {...props}
+ >
+ <div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
+ {children}
+ </DrawerPrimitive.Content>
+ </DrawerPortal>
+));
+DrawerContent.displayName = 'DrawerContent';
+
+const DrawerHeader = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)}
+ {...props}
+ />
+);
+DrawerHeader.displayName = 'DrawerHeader';
+
+const DrawerFooter = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn('mt-auto flex flex-col gap-2 p-4', className)}
+ {...props}
+ />
+);
+DrawerFooter.displayName = 'DrawerFooter';
+
+const DrawerTitle = React.forwardRef<
+ React.ElementRef<typeof DrawerPrimitive.Title>,
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
+>(({ className, ...props }, ref) => (
+ <DrawerPrimitive.Title
+ ref={ref}
+ className={cn(
+ 'text-lg font-semibold leading-none tracking-tight',
+ className
+ )}
+ {...props}
+ />
+));
+DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
+
+const DrawerDescription = React.forwardRef<
+ React.ElementRef<typeof DrawerPrimitive.Description>,
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
+>(({ className, ...props }, ref) => (
+ <DrawerPrimitive.Description
+ ref={ref}
+ className={cn('text-sm text-muted-foreground', className)}
+ {...props}
+ />
+));
+DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
+
+export {
+ Drawer,
+ DrawerClose,
+ DrawerContent,
+ DrawerDescription,
+ DrawerFooter,
+ DrawerHeader,
+ DrawerOverlay,
+ DrawerPortal,
+ DrawerTitle,
+ DrawerTrigger,
+};
diff --git a/packages/frontend/admin/src/components/ui/dropdown-menu.tsx b/packages/frontend/admin/src/components/ui/dropdown-menu.tsx
new file mode 100644
index 0000000000..b86760b4ea
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/dropdown-menu.tsx
@@ -0,0 +1,197 @@
+import { cn } from '@affine/admin/utils';
+import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
+import { Check, ChevronRight, Circle } from 'lucide-react';
+import * as React from 'react';
+
+const DropdownMenu = DropdownMenuPrimitive.Root;
+
+const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
+
+const DropdownMenuGroup = DropdownMenuPrimitive.Group;
+
+const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
+
+const DropdownMenuSub = DropdownMenuPrimitive.Sub;
+
+const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
+
+const DropdownMenuSubTrigger = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
+ inset?: boolean;
+ }
+>(({ className, inset, children, ...props }, ref) => (
+ <DropdownMenuPrimitive.SubTrigger
+ ref={ref}
+ className={cn(
+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronRight className="ml-auto h-4 w-4" />
+ </DropdownMenuPrimitive.SubTrigger>
+));
+DropdownMenuSubTrigger.displayName =
+ DropdownMenuPrimitive.SubTrigger.displayName;
+
+const DropdownMenuSubContent = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
+>(({ className, ...props }, ref) => (
+ <DropdownMenuPrimitive.SubContent
+ ref={ref}
+ className={cn(
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+));
+DropdownMenuSubContent.displayName =
+ DropdownMenuPrimitive.SubContent.displayName;
+
+const DropdownMenuContent = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
+>(({ className, sideOffset = 4, ...props }, ref) => (
+ <DropdownMenuPrimitive.Portal>
+ <DropdownMenuPrimitive.Content
+ ref={ref}
+ sideOffset={sideOffset}
+ className={cn(
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+ </DropdownMenuPrimitive.Portal>
+));
+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
+
+const DropdownMenuItem = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
+ inset?: boolean;
+ }
+>(({ className, inset, ...props }, ref) => (
+ <DropdownMenuPrimitive.Item
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ />
+));
+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
+
+const DropdownMenuCheckboxItem = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
+>(({ className, children, checked, ...props }, ref) => (
+ <DropdownMenuPrimitive.CheckboxItem
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ checked={checked}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <DropdownMenuPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </DropdownMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </DropdownMenuPrimitive.CheckboxItem>
+));
+DropdownMenuCheckboxItem.displayName =
+ DropdownMenuPrimitive.CheckboxItem.displayName;
+
+const DropdownMenuRadioItem = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
+>(({ className, children, ...props }, ref) => (
+ <DropdownMenuPrimitive.RadioItem
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <DropdownMenuPrimitive.ItemIndicator>
+ <Circle className="h-2 w-2 fill-current" />
+ </DropdownMenuPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </DropdownMenuPrimitive.RadioItem>
+));
+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
+
+const DropdownMenuLabel = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
+ inset?: boolean;
+ }
+>(({ className, inset, ...props }, ref) => (
+ <DropdownMenuPrimitive.Label
+ ref={ref}
+ className={cn(
+ 'px-2 py-1.5 text-sm font-semibold',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ />
+));
+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
+
+const DropdownMenuSeparator = React.forwardRef<
+ React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <DropdownMenuPrimitive.Separator
+ ref={ref}
+ className={cn('-mx-1 my-1 h-px bg-muted', className)}
+ {...props}
+ />
+));
+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
+
+const DropdownMenuShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLSpanElement>) => {
+ return (
+ <span
+ className={cn('ml-auto text-xs tracking-widest opacity-60', className)}
+ {...props}
+ />
+ );
+};
+DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
+
+export {
+ DropdownMenu,
+ DropdownMenuCheckboxItem,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuPortal,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
+ DropdownMenuSeparator,
+ DropdownMenuShortcut,
+ DropdownMenuSub,
+ DropdownMenuSubContent,
+ DropdownMenuSubTrigger,
+ DropdownMenuTrigger,
+};
diff --git a/packages/frontend/admin/src/components/ui/form.tsx b/packages/frontend/admin/src/components/ui/form.tsx
new file mode 100644
index 0000000000..7277a5c128
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/form.tsx
@@ -0,0 +1,170 @@
+import { Label } from '@affine/admin/components/ui/label';
+import { cn } from '@affine/admin/utils';
+import type * as LabelPrimitive from '@radix-ui/react-label';
+import { Slot } from '@radix-ui/react-slot';
+import * as React from 'react';
+import type { ControllerProps, FieldPath, FieldValues } from 'react-hook-form';
+import { Controller, FormProvider, useFormContext } from 'react-hook-form';
+
+const Form = FormProvider;
+
+type FormFieldContextValue<
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
+> = {
+ name: TName;
+};
+
+const FormFieldContext = React.createContext<FormFieldContextValue>(
+ {} as FormFieldContextValue
+);
+
+const FormField = <
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
+>({
+ ...props
+}: ControllerProps<TFieldValues, TName>) => {
+ return (
+ <FormFieldContext.Provider value={{ name: props.name }}>
+ <Controller {...props} />
+ </FormFieldContext.Provider>
+ );
+};
+
+const useFormField = () => {
+ const fieldContext = React.useContext(FormFieldContext);
+ const itemContext = React.useContext(FormItemContext);
+ const { getFieldState, formState } = useFormContext();
+
+ const fieldState = getFieldState(fieldContext.name, formState);
+
+ if (!fieldContext) {
+ throw new Error('useFormField should be used within <FormField>');
+ }
+
+ const { id } = itemContext;
+
+ return {
+ id,
+ name: fieldContext.name,
+ formItemId: `${id}-form-item`,
+ formDescriptionId: `${id}-form-item-description`,
+ formMessageId: `${id}-form-item-message`,
+ ...fieldState,
+ };
+};
+
+type FormItemContextValue = {
+ id: string;
+};
+
+const FormItemContext = React.createContext<FormItemContextValue>(
+ {} as FormItemContextValue
+);
+
+const FormItem = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => {
+ const id = React.useId();
+
+ return (
+ <FormItemContext.Provider value={{ id }}>
+ <div ref={ref} className={cn('space-y-2', className)} {...props} />
+ </FormItemContext.Provider>
+ );
+});
+FormItem.displayName = 'FormItem';
+
+const FormLabel = React.forwardRef<
+ React.ElementRef<typeof LabelPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
+>(({ className, ...props }, ref) => {
+ const { error, formItemId } = useFormField();
+
+ return (
+ <Label
+ ref={ref}
+ className={cn(error && 'text-destructive', className)}
+ htmlFor={formItemId}
+ {...props}
+ />
+ );
+});
+FormLabel.displayName = 'FormLabel';
+
+const FormControl = React.forwardRef<
+ React.ElementRef<typeof Slot>,
+ React.ComponentPropsWithoutRef<typeof Slot>
+>(({ ...props }, ref) => {
+ const { error, formItemId, formDescriptionId, formMessageId } =
+ useFormField();
+
+ return (
+ <Slot
+ ref={ref}
+ id={formItemId}
+ aria-describedby={
+ !error
+ ? `${formDescriptionId}`
+ : `${formDescriptionId} ${formMessageId}`
+ }
+ aria-invalid={!!error}
+ {...props}
+ />
+ );
+});
+FormControl.displayName = 'FormControl';
+
+const FormDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => {
+ const { formDescriptionId } = useFormField();
+
+ return (
+ <p
+ ref={ref}
+ id={formDescriptionId}
+ className={cn('text-sm text-muted-foreground', className)}
+ {...props}
+ />
+ );
+});
+FormDescription.displayName = 'FormDescription';
+
+const FormMessage = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, children, ...props }, ref) => {
+ const { error, formMessageId } = useFormField();
+ const body = error ? String(error?.message) : children;
+
+ if (!body) {
+ return null;
+ }
+
+ return (
+ <p
+ ref={ref}
+ id={formMessageId}
+ className={cn('text-sm font-medium text-destructive', className)}
+ {...props}
+ >
+ {body}
+ </p>
+ );
+});
+FormMessage.displayName = 'FormMessage';
+
+export {
+ Form,
+ FormControl,
+ FormDescription,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+ useFormField,
+};
diff --git a/packages/frontend/admin/src/components/ui/hover-card.tsx b/packages/frontend/admin/src/components/ui/hover-card.tsx
new file mode 100644
index 0000000000..9242adff18
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/hover-card.tsx
@@ -0,0 +1,26 @@
+import { cn } from '@affine/admin/utils';
+import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
+import * as React from 'react';
+
+const HoverCard = HoverCardPrimitive.Root;
+
+const HoverCardTrigger = HoverCardPrimitive.Trigger;
+
+const HoverCardContent = React.forwardRef<
+ React.ElementRef<typeof HoverCardPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
+>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
+ <HoverCardPrimitive.Content
+ ref={ref}
+ align={align}
+ sideOffset={sideOffset}
+ className={cn(
+ 'z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+));
+HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
+
+export { HoverCard, HoverCardContent, HoverCardTrigger };
diff --git a/packages/frontend/admin/src/components/ui/input-otp.tsx b/packages/frontend/admin/src/components/ui/input-otp.tsx
new file mode 100644
index 0000000000..4980ec0957
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/input-otp.tsx
@@ -0,0 +1,68 @@
+import { cn } from '@affine/admin/utils';
+import { OTPInput, OTPInputContext } from 'input-otp';
+import { Dot } from 'lucide-react';
+import * as React from 'react';
+
+const InputOTP = React.forwardRef<
+ React.ElementRef<typeof OTPInput>,
+ React.ComponentPropsWithoutRef<typeof OTPInput>
+>(({ className, containerClassName, ...props }, ref) => (
+ <OTPInput
+ ref={ref}
+ containerClassName={cn(
+ 'flex items-center gap-2 has-[:disabled]:opacity-50',
+ containerClassName
+ )}
+ className={cn('disabled:cursor-not-allowed', className)}
+ {...props}
+ />
+));
+InputOTP.displayName = 'InputOTP';
+
+const InputOTPGroup = React.forwardRef<
+ React.ElementRef<'div'>,
+ React.ComponentPropsWithoutRef<'div'>
+>(({ className, ...props }, ref) => (
+ <div ref={ref} className={cn('flex items-center', className)} {...props} />
+));
+InputOTPGroup.displayName = 'InputOTPGroup';
+
+const InputOTPSlot = React.forwardRef<
+ React.ElementRef<'div'>,
+ React.ComponentPropsWithoutRef<'div'> & { index: number }
+>(({ index, className, ...props }, ref) => {
+ const inputOTPContext = React.useContext(OTPInputContext);
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
+
+ return (
+ <div
+ ref={ref}
+ className={cn(
+ 'relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',
+ isActive && 'z-10 ring-2 ring-ring ring-offset-background',
+ className
+ )}
+ {...props}
+ >
+ {char}
+ {hasFakeCaret && (
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
+ <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
+ </div>
+ )}
+ </div>
+ );
+});
+InputOTPSlot.displayName = 'InputOTPSlot';
+
+const InputOTPSeparator = React.forwardRef<
+ React.ElementRef<'div'>,
+ React.ComponentPropsWithoutRef<'div'>
+>(({ ...props }, ref) => (
+ <div ref={ref} role="separator" {...props}>
+ <Dot />
+ </div>
+));
+InputOTPSeparator.displayName = 'InputOTPSeparator';
+
+export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
diff --git a/packages/frontend/admin/src/components/ui/input.tsx b/packages/frontend/admin/src/components/ui/input.tsx
new file mode 100644
index 0000000000..86855814be
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/input.tsx
@@ -0,0 +1,24 @@
+import { cn } from '@affine/admin/utils';
+import * as React from 'react';
+
+export interface InputProps
+ extends React.InputHTMLAttributes<HTMLInputElement> {}
+
+const Input = React.forwardRef<HTMLInputElement, InputProps>(
+ ({ className, type, ...props }, ref) => {
+ return (
+ <input
+ type={type}
+ className={cn(
+ 'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ );
+ }
+);
+Input.displayName = 'Input';
+
+export { Input };
diff --git a/packages/frontend/admin/src/components/ui/label.tsx b/packages/frontend/admin/src/components/ui/label.tsx
new file mode 100644
index 0000000000..6b5ea4f44a
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/label.tsx
@@ -0,0 +1,23 @@
+import { cn } from '@affine/admin/utils';
+import * as LabelPrimitive from '@radix-ui/react-label';
+import { cva, type VariantProps } from 'class-variance-authority';
+import * as React from 'react';
+
+const labelVariants = cva(
+ 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'
+);
+
+const Label = React.forwardRef<
+ React.ElementRef<typeof LabelPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
+ VariantProps<typeof labelVariants>
+>(({ className, ...props }, ref) => (
+ <LabelPrimitive.Root
+ ref={ref}
+ className={cn(labelVariants(), className)}
+ {...props}
+ />
+));
+Label.displayName = LabelPrimitive.Root.displayName;
+
+export { Label };
diff --git a/packages/frontend/admin/src/components/ui/menubar.tsx b/packages/frontend/admin/src/components/ui/menubar.tsx
new file mode 100644
index 0000000000..827421b787
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/menubar.tsx
@@ -0,0 +1,233 @@
+import { cn } from '@affine/admin/utils';
+import * as MenubarPrimitive from '@radix-ui/react-menubar';
+import { Check, ChevronRight, Circle } from 'lucide-react';
+import * as React from 'react';
+
+const MenubarMenu = MenubarPrimitive.Menu;
+
+const MenubarGroup = MenubarPrimitive.Group;
+
+const MenubarPortal = MenubarPrimitive.Portal;
+
+const MenubarSub = MenubarPrimitive.Sub;
+
+const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
+
+const Menubar = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
+>(({ className, ...props }, ref) => (
+ <MenubarPrimitive.Root
+ ref={ref}
+ className={cn(
+ 'flex h-10 items-center space-x-1 rounded-md border bg-background p-1',
+ className
+ )}
+ {...props}
+ />
+));
+Menubar.displayName = MenubarPrimitive.Root.displayName;
+
+const MenubarTrigger = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
+>(({ className, ...props }, ref) => (
+ <MenubarPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ 'flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
+ className
+ )}
+ {...props}
+ />
+));
+MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
+
+const MenubarSubTrigger = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
+ inset?: boolean;
+ }
+>(({ className, inset, children, ...props }, ref) => (
+ <MenubarPrimitive.SubTrigger
+ ref={ref}
+ className={cn(
+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <ChevronRight className="ml-auto h-4 w-4" />
+ </MenubarPrimitive.SubTrigger>
+));
+MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
+
+const MenubarSubContent = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.SubContent>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
+>(({ className, ...props }, ref) => (
+ <MenubarPrimitive.SubContent
+ ref={ref}
+ className={cn(
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+));
+MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
+
+const MenubarContent = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
+>(
+ (
+ { className, align = 'start', alignOffset = -4, sideOffset = 8, ...props },
+ ref
+ ) => (
+ <MenubarPrimitive.Portal>
+ <MenubarPrimitive.Content
+ ref={ref}
+ align={align}
+ alignOffset={alignOffset}
+ sideOffset={sideOffset}
+ className={cn(
+ 'z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+ </MenubarPrimitive.Portal>
+ )
+);
+MenubarContent.displayName = MenubarPrimitive.Content.displayName;
+
+const MenubarItem = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
+ inset?: boolean;
+ }
+>(({ className, inset, ...props }, ref) => (
+ <MenubarPrimitive.Item
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ />
+));
+MenubarItem.displayName = MenubarPrimitive.Item.displayName;
+
+const MenubarCheckboxItem = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
+>(({ className, children, checked, ...props }, ref) => (
+ <MenubarPrimitive.CheckboxItem
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ checked={checked}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <MenubarPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </MenubarPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </MenubarPrimitive.CheckboxItem>
+));
+MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
+
+const MenubarRadioItem = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.RadioItem>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
+>(({ className, children, ...props }, ref) => (
+ <MenubarPrimitive.RadioItem
+ ref={ref}
+ className={cn(
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <MenubarPrimitive.ItemIndicator>
+ <Circle className="h-2 w-2 fill-current" />
+ </MenubarPrimitive.ItemIndicator>
+ </span>
+ {children}
+ </MenubarPrimitive.RadioItem>
+));
+MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
+
+const MenubarLabel = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
+ inset?: boolean;
+ }
+>(({ className, inset, ...props }, ref) => (
+ <MenubarPrimitive.Label
+ ref={ref}
+ className={cn(
+ 'px-2 py-1.5 text-sm font-semibold',
+ inset && 'pl-8',
+ className
+ )}
+ {...props}
+ />
+));
+MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
+
+const MenubarSeparator = React.forwardRef<
+ React.ElementRef<typeof MenubarPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <MenubarPrimitive.Separator
+ ref={ref}
+ className={cn('-mx-1 my-1 h-px bg-muted', className)}
+ {...props}
+ />
+));
+MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
+
+const MenubarShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLSpanElement>) => {
+ return (
+ <span
+ className={cn(
+ 'ml-auto text-xs tracking-widest text-muted-foreground',
+ className
+ )}
+ {...props}
+ />
+ );
+};
+MenubarShortcut.displayname = 'MenubarShortcut';
+
+export {
+ Menubar,
+ MenubarCheckboxItem,
+ MenubarContent,
+ MenubarGroup,
+ MenubarItem,
+ MenubarLabel,
+ MenubarMenu,
+ MenubarPortal,
+ MenubarRadioGroup,
+ MenubarRadioItem,
+ MenubarSeparator,
+ MenubarShortcut,
+ MenubarSub,
+ MenubarSubContent,
+ MenubarSubTrigger,
+ MenubarTrigger,
+};
diff --git a/packages/frontend/admin/src/components/ui/navigation-menu.tsx b/packages/frontend/admin/src/components/ui/navigation-menu.tsx
new file mode 100644
index 0000000000..53a77ebefb
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/navigation-menu.tsx
@@ -0,0 +1,127 @@
+import { cn } from '@affine/admin/utils';
+import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
+import { cva } from 'class-variance-authority';
+import { ChevronDown } from 'lucide-react';
+import * as React from 'react';
+
+const NavigationMenu = React.forwardRef<
+ React.ElementRef<typeof NavigationMenuPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
+>(({ className, children, ...props }, ref) => (
+ <NavigationMenuPrimitive.Root
+ ref={ref}
+ className={cn(
+ 'relative z-10 flex max-w-max flex-1 items-center justify-center',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <NavigationMenuViewport />
+ </NavigationMenuPrimitive.Root>
+));
+NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
+
+const NavigationMenuList = React.forwardRef<
+ React.ElementRef<typeof NavigationMenuPrimitive.List>,
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
+>(({ className, ...props }, ref) => (
+ <NavigationMenuPrimitive.List
+ ref={ref}
+ className={cn(
+ 'group flex flex-1 list-none items-center justify-center space-x-1',
+ className
+ )}
+ {...props}
+ />
+));
+NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
+
+const NavigationMenuItem = NavigationMenuPrimitive.Item;
+
+const navigationMenuTriggerStyle = cva(
+ 'group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50'
+);
+
+const NavigationMenuTrigger = React.forwardRef<
+ React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
+>(({ className, children, ...props }, ref) => (
+ <NavigationMenuPrimitive.Trigger
+ ref={ref}
+ className={cn(navigationMenuTriggerStyle(), 'group', className)}
+ {...props}
+ >
+ {children}{' '}
+ <ChevronDown
+ className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
+ aria-hidden="true"
+ />
+ </NavigationMenuPrimitive.Trigger>
+));
+NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
+
+const NavigationMenuContent = React.forwardRef<
+ React.ElementRef<typeof NavigationMenuPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <NavigationMenuPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ',
+ className
+ )}
+ {...props}
+ />
+));
+NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
+
+const NavigationMenuLink = NavigationMenuPrimitive.Link;
+
+const NavigationMenuViewport = React.forwardRef<
+ React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
+>(({ className, ...props }, ref) => (
+ <div className={cn('absolute left-0 top-full flex justify-center')}>
+ <NavigationMenuPrimitive.Viewport
+ className={cn(
+ 'origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]',
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ </div>
+));
+NavigationMenuViewport.displayName =
+ NavigationMenuPrimitive.Viewport.displayName;
+
+const NavigationMenuIndicator = React.forwardRef<
+ React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
+>(({ className, ...props }, ref) => (
+ <NavigationMenuPrimitive.Indicator
+ ref={ref}
+ className={cn(
+ 'top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in',
+ className
+ )}
+ {...props}
+ >
+ <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
+ </NavigationMenuPrimitive.Indicator>
+));
+NavigationMenuIndicator.displayName =
+ NavigationMenuPrimitive.Indicator.displayName;
+
+export {
+ NavigationMenu,
+ NavigationMenuContent,
+ NavigationMenuIndicator,
+ NavigationMenuItem,
+ NavigationMenuLink,
+ NavigationMenuList,
+ NavigationMenuTrigger,
+ navigationMenuTriggerStyle,
+ NavigationMenuViewport,
+};
diff --git a/packages/frontend/admin/src/components/ui/pagination.tsx b/packages/frontend/admin/src/components/ui/pagination.tsx
new file mode 100644
index 0000000000..d94868b85a
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/pagination.tsx
@@ -0,0 +1,117 @@
+import type { ButtonProps } from '@affine/admin/components/ui/button';
+import { buttonVariants } from '@affine/admin/components/ui/button';
+import { cn } from '@affine/admin/utils';
+import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
+import * as React from 'react';
+
+const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
+ <nav
+ role="navigation"
+ aria-label="pagination"
+ className={cn('mx-auto flex w-full justify-center', className)}
+ {...props}
+ />
+);
+Pagination.displayName = 'Pagination';
+
+const PaginationContent = React.forwardRef<
+ HTMLUListElement,
+ React.ComponentProps<'ul'>
+>(({ className, ...props }, ref) => (
+ <ul
+ ref={ref}
+ className={cn('flex flex-row items-center gap-1', className)}
+ {...props}
+ />
+));
+PaginationContent.displayName = 'PaginationContent';
+
+const PaginationItem = React.forwardRef<
+ HTMLLIElement,
+ React.ComponentProps<'li'>
+>(({ className, ...props }, ref) => (
+ <li ref={ref} className={cn('', className)} {...props} />
+));
+PaginationItem.displayName = 'PaginationItem';
+
+type PaginationLinkProps = {
+ isActive?: boolean;
+} & Pick<ButtonProps, 'size'> &
+ React.ComponentProps<'a'>;
+
+const PaginationLink = ({
+ className,
+ isActive,
+ size = 'icon',
+ ...props
+}: PaginationLinkProps) => (
+ <a
+ aria-current={isActive ? 'page' : undefined}
+ className={cn(
+ buttonVariants({
+ variant: isActive ? 'outline' : 'ghost',
+ size,
+ }),
+ className
+ )}
+ {...props}
+ />
+);
+PaginationLink.displayName = 'PaginationLink';
+
+const PaginationPrevious = ({
+ className,
+ ...props
+}: React.ComponentProps<typeof PaginationLink>) => (
+ <PaginationLink
+ aria-label="Go to previous page"
+ size="default"
+ className={cn('gap-1 pl-2.5', className)}
+ {...props}
+ >
+ <ChevronLeft className="h-4 w-4" />
+ <span>Previous</span>
+ </PaginationLink>
+);
+PaginationPrevious.displayName = 'PaginationPrevious';
+
+const PaginationNext = ({
+ className,
+ ...props
+}: React.ComponentProps<typeof PaginationLink>) => (
+ <PaginationLink
+ aria-label="Go to next page"
+ size="default"
+ className={cn('gap-1 pr-2.5', className)}
+ {...props}
+ >
+ <span>Next</span>
+ <ChevronRight className="h-4 w-4" />
+ </PaginationLink>
+);
+PaginationNext.displayName = 'PaginationNext';
+
+const PaginationEllipsis = ({
+ className,
+ ...props
+}: React.ComponentProps<'span'>) => (
+ <span
+ aria-hidden
+ className={cn('flex h-9 w-9 items-center justify-center', className)}
+ {...props}
+ >
+ <MoreHorizontal className="h-4 w-4" />
+ <span className="sr-only">More pages</span>
+ </span>
+);
+PaginationEllipsis.displayName = 'PaginationEllipsis';
+
+export {
+ Pagination,
+ PaginationContent,
+ PaginationEllipsis,
+ PaginationItem,
+ PaginationLink,
+ PaginationNext,
+ PaginationPrevious,
+};
diff --git a/packages/frontend/admin/src/components/ui/popover.tsx b/packages/frontend/admin/src/components/ui/popover.tsx
new file mode 100644
index 0000000000..4c22276bd7
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/popover.tsx
@@ -0,0 +1,28 @@
+import { cn } from '@affine/admin/utils';
+import * as PopoverPrimitive from '@radix-ui/react-popover';
+import * as React from 'react';
+
+const Popover = PopoverPrimitive.Root;
+
+const PopoverTrigger = PopoverPrimitive.Trigger;
+
+const PopoverContent = React.forwardRef<
+ React.ElementRef<typeof PopoverPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
+>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
+ <PopoverPrimitive.Portal>
+ <PopoverPrimitive.Content
+ ref={ref}
+ align={align}
+ sideOffset={sideOffset}
+ className={cn(
+ 'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+ </PopoverPrimitive.Portal>
+));
+PopoverContent.displayName = PopoverPrimitive.Content.displayName;
+
+export { Popover, PopoverContent, PopoverTrigger };
diff --git a/packages/frontend/admin/src/components/ui/progress.tsx b/packages/frontend/admin/src/components/ui/progress.tsx
new file mode 100644
index 0000000000..2aaaac6827
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/progress.tsx
@@ -0,0 +1,25 @@
+import { cn } from '@affine/admin/utils';
+import * as ProgressPrimitive from '@radix-ui/react-progress';
+import * as React from 'react';
+
+const Progress = React.forwardRef<
+ React.ElementRef<typeof ProgressPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
+>(({ className, value, ...props }, ref) => (
+ <ProgressPrimitive.Root
+ ref={ref}
+ className={cn(
+ 'relative h-4 w-full overflow-hidden rounded-full bg-secondary',
+ className
+ )}
+ {...props}
+ >
+ <ProgressPrimitive.Indicator
+ className="h-full w-full flex-1 bg-primary transition-all"
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
+ />
+ </ProgressPrimitive.Root>
+));
+Progress.displayName = ProgressPrimitive.Root.displayName;
+
+export { Progress };
diff --git a/packages/frontend/admin/src/components/ui/radio-group.tsx b/packages/frontend/admin/src/components/ui/radio-group.tsx
new file mode 100644
index 0000000000..0e53da0744
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/radio-group.tsx
@@ -0,0 +1,41 @@
+import { cn } from '@affine/admin/utils';
+import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
+import { Circle } from 'lucide-react';
+import * as React from 'react';
+
+const RadioGroup = React.forwardRef<
+ React.ElementRef<typeof RadioGroupPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
+>(({ className, ...props }, ref) => {
+ return (
+ <RadioGroupPrimitive.Root
+ className={cn('grid gap-2', className)}
+ {...props}
+ ref={ref}
+ />
+ );
+});
+RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
+
+const RadioGroupItem = React.forwardRef<
+ React.ElementRef<typeof RadioGroupPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
+>(({ className, ...props }, ref) => {
+ return (
+ <RadioGroupPrimitive.Item
+ ref={ref}
+ className={cn(
+ 'aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
+ className
+ )}
+ {...props}
+ >
+ <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
+ <Circle className="h-2.5 w-2.5 fill-current text-current" />
+ </RadioGroupPrimitive.Indicator>
+ </RadioGroupPrimitive.Item>
+ );
+});
+RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
+
+export { RadioGroup, RadioGroupItem };
diff --git a/packages/frontend/admin/src/components/ui/resizable.tsx b/packages/frontend/admin/src/components/ui/resizable.tsx
new file mode 100644
index 0000000000..99d8a4176f
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/resizable.tsx
@@ -0,0 +1,42 @@
+import { cn } from '@affine/admin/utils';
+import { GripVertical } from 'lucide-react';
+import * as ResizablePrimitive from 'react-resizable-panels';
+
+const ResizablePanelGroup = ({
+ className,
+ ...props
+}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
+ <ResizablePrimitive.PanelGroup
+ className={cn(
+ 'flex h-full w-full data-[panel-group-direction=vertical]:flex-col',
+ className
+ )}
+ {...props}
+ />
+);
+
+const ResizablePanel = ResizablePrimitive.Panel;
+
+const ResizableHandle = ({
+ withHandle,
+ className,
+ ...props
+}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
+ withHandle?: boolean;
+}) => (
+ <ResizablePrimitive.PanelResizeHandle
+ className={cn(
+ 'relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',
+ className
+ )}
+ {...props}
+ >
+ {withHandle && (
+ <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
+ <GripVertical className="h-2.5 w-2.5" />
+ </div>
+ )}
+ </ResizablePrimitive.PanelResizeHandle>
+);
+
+export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
diff --git a/packages/frontend/admin/src/components/ui/scroll-area.tsx b/packages/frontend/admin/src/components/ui/scroll-area.tsx
new file mode 100644
index 0000000000..69ffbe1066
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/scroll-area.tsx
@@ -0,0 +1,45 @@
+import { cn } from '@affine/admin/utils';
+import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
+import * as React from 'react';
+
+const ScrollArea = React.forwardRef<
+ React.ElementRef<typeof ScrollAreaPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
+>(({ className, children, ...props }, ref) => (
+ <ScrollAreaPrimitive.Root
+ ref={ref}
+ className={cn('relative overflow-hidden', className)}
+ {...props}
+ >
+ <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
+ {children}
+ </ScrollAreaPrimitive.Viewport>
+ <ScrollBar />
+ <ScrollAreaPrimitive.Corner />
+ </ScrollAreaPrimitive.Root>
+));
+ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
+
+const ScrollBar = React.forwardRef<
+ React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
+>(({ className, orientation = 'vertical', ...props }, ref) => (
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
+ ref={ref}
+ orientation={orientation}
+ className={cn(
+ 'flex touch-none select-none transition-colors',
+ orientation === 'vertical' &&
+ 'h-full w-2.5 border-l border-l-transparent p-[1px]',
+ orientation === 'horizontal' &&
+ 'h-2.5 flex-col border-t border-t-transparent p-[1px]',
+ className
+ )}
+ {...props}
+ >
+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
+));
+ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
+
+export { ScrollArea, ScrollBar };
diff --git a/packages/frontend/admin/src/components/ui/select.tsx b/packages/frontend/admin/src/components/ui/select.tsx
new file mode 100644
index 0000000000..005ba41db5
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/select.tsx
@@ -0,0 +1,157 @@
+import { cn } from '@affine/admin/utils';
+import * as SelectPrimitive from '@radix-ui/react-select';
+import { Check, ChevronDown, ChevronUp } from 'lucide-react';
+import * as React from 'react';
+
+const Select = SelectPrimitive.Root;
+
+const SelectGroup = SelectPrimitive.Group;
+
+const SelectValue = SelectPrimitive.Value;
+
+const SelectTrigger = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
+>(({ className, children, ...props }, ref) => (
+ <SelectPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ 'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
+ className
+ )}
+ {...props}
+ >
+ {children}
+ <SelectPrimitive.Icon asChild>
+ <ChevronDown className="h-4 w-4 opacity-50" />
+ </SelectPrimitive.Icon>
+ </SelectPrimitive.Trigger>
+));
+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
+
+const SelectScrollUpButton = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.ScrollUpButton
+ ref={ref}
+ className={cn(
+ 'flex cursor-default items-center justify-center py-1',
+ className
+ )}
+ {...props}
+ >
+ <ChevronUp className="h-4 w-4" />
+ </SelectPrimitive.ScrollUpButton>
+));
+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
+
+const SelectScrollDownButton = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.ScrollDownButton
+ ref={ref}
+ className={cn(
+ 'flex cursor-default items-center justify-center py-1',
+ className
+ )}
+ {...props}
+ >
+ <ChevronDown className="h-4 w-4" />
+ </SelectPrimitive.ScrollDownButton>
+));
+SelectScrollDownButton.displayName =
+ SelectPrimitive.ScrollDownButton.displayName;
+
+const SelectContent = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
+>(({ className, children, position = 'popper', ...props }, ref) => (
+ <SelectPrimitive.Portal>
+ <SelectPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ position === 'popper' &&
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
+ className
+ )}
+ position={position}
+ {...props}
+ >
+ <SelectScrollUpButton />
+ <SelectPrimitive.Viewport
+ className={cn(
+ 'p-1',
+ position === 'popper' &&
+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'
+ )}
+ >
+ {children}
+ </SelectPrimitive.Viewport>
+ <SelectScrollDownButton />
+ </SelectPrimitive.Content>
+ </SelectPrimitive.Portal>
+));
+SelectContent.displayName = SelectPrimitive.Content.displayName;
+
+const SelectLabel = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Label>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.Label
+ ref={ref}
+ className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}
+ {...props}
+ />
+));
+SelectLabel.displayName = SelectPrimitive.Label.displayName;
+
+const SelectItem = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
+>(({ className, children, ...props }, ref) => (
+ <SelectPrimitive.Item
+ ref={ref}
+ className={cn(
+ 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
+ className
+ )}
+ {...props}
+ >
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <SelectPrimitive.ItemIndicator>
+ <Check className="h-4 w-4" />
+ </SelectPrimitive.ItemIndicator>
+ </span>
+
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
+ </SelectPrimitive.Item>
+));
+SelectItem.displayName = SelectPrimitive.Item.displayName;
+
+const SelectSeparator = React.forwardRef<
+ React.ElementRef<typeof SelectPrimitive.Separator>,
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
+>(({ className, ...props }, ref) => (
+ <SelectPrimitive.Separator
+ ref={ref}
+ className={cn('-mx-1 my-1 h-px bg-muted', className)}
+ {...props}
+ />
+));
+SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
+
+export {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectScrollDownButton,
+ SelectScrollUpButton,
+ SelectSeparator,
+ SelectTrigger,
+ SelectValue,
+};
diff --git a/packages/frontend/admin/src/components/ui/separator.tsx b/packages/frontend/admin/src/components/ui/separator.tsx
new file mode 100644
index 0000000000..69a15b87e9
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/separator.tsx
@@ -0,0 +1,28 @@
+import { cn } from '@affine/admin/utils';
+import * as SeparatorPrimitive from '@radix-ui/react-separator';
+import * as React from 'react';
+
+const Separator = React.forwardRef<
+ React.ElementRef<typeof SeparatorPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
+>(
+ (
+ { className, orientation = 'horizontal', decorative = true, ...props },
+ ref
+ ) => (
+ <SeparatorPrimitive.Root
+ ref={ref}
+ decorative={decorative}
+ orientation={orientation}
+ className={cn(
+ 'shrink-0 bg-border',
+ orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
+ className
+ )}
+ {...props}
+ />
+ )
+);
+Separator.displayName = SeparatorPrimitive.Root.displayName;
+
+export { Separator };
diff --git a/packages/frontend/admin/src/components/ui/sheet.tsx b/packages/frontend/admin/src/components/ui/sheet.tsx
new file mode 100644
index 0000000000..f7999d711a
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/sheet.tsx
@@ -0,0 +1,137 @@
+import { cn } from '@affine/admin/utils';
+import * as SheetPrimitive from '@radix-ui/react-dialog';
+import { cva, type VariantProps } from 'class-variance-authority';
+import { X } from 'lucide-react';
+import * as React from 'react';
+
+const Sheet = SheetPrimitive.Root;
+
+const SheetTrigger = SheetPrimitive.Trigger;
+
+const SheetClose = SheetPrimitive.Close;
+
+const SheetPortal = SheetPrimitive.Portal;
+
+const SheetOverlay = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Overlay>,
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
+>(({ className, ...props }, ref) => (
+ <SheetPrimitive.Overlay
+ className={cn(
+ 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
+ className
+ )}
+ {...props}
+ ref={ref}
+ />
+));
+SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
+
+const sheetVariants = cva(
+ 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
+ {
+ variants: {
+ side: {
+ top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
+ bottom:
+ 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
+ left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
+ right:
+ 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',
+ },
+ },
+ defaultVariants: {
+ side: 'right',
+ },
+ }
+);
+
+interface SheetContentProps
+ extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
+ VariantProps<typeof sheetVariants> {}
+
+const SheetContent = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Content>,
+ SheetContentProps
+>(({ side = 'right', className, children, ...props }, ref) => (
+ <SheetPortal>
+ <SheetOverlay />
+ <SheetPrimitive.Content
+ ref={ref}
+ className={cn(sheetVariants({ side }), className)}
+ {...props}
+ >
+ {children}
+ <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
+ <X className="h-4 w-4" />
+ <span className="sr-only">Close</span>
+ </SheetPrimitive.Close>
+ </SheetPrimitive.Content>
+ </SheetPortal>
+));
+SheetContent.displayName = SheetPrimitive.Content.displayName;
+
+const SheetHeader = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col space-y-2 text-center sm:text-left',
+ className
+ )}
+ {...props}
+ />
+);
+SheetHeader.displayName = 'SheetHeader';
+
+const SheetFooter = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
+ className
+ )}
+ {...props}
+ />
+);
+SheetFooter.displayName = 'SheetFooter';
+
+const SheetTitle = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Title>,
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
+>(({ className, ...props }, ref) => (
+ <SheetPrimitive.Title
+ ref={ref}
+ className={cn('text-lg font-semibold text-foreground', className)}
+ {...props}
+ />
+));
+SheetTitle.displayName = SheetPrimitive.Title.displayName;
+
+const SheetDescription = React.forwardRef<
+ React.ElementRef<typeof SheetPrimitive.Description>,
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
+>(({ className, ...props }, ref) => (
+ <SheetPrimitive.Description
+ ref={ref}
+ className={cn('text-sm text-muted-foreground', className)}
+ {...props}
+ />
+));
+SheetDescription.displayName = SheetPrimitive.Description.displayName;
+
+export {
+ Sheet,
+ SheetClose,
+ SheetContent,
+ SheetDescription,
+ SheetFooter,
+ SheetHeader,
+ SheetOverlay,
+ SheetPortal,
+ SheetTitle,
+ SheetTrigger,
+};
diff --git a/packages/frontend/admin/src/components/ui/skeleton.tsx b/packages/frontend/admin/src/components/ui/skeleton.tsx
new file mode 100644
index 0000000000..f792ca7937
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/skeleton.tsx
@@ -0,0 +1,15 @@
+import { cn } from '@affine/admin/utils';
+
+function Skeleton({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+ return (
+ <div
+ className={cn('animate-pulse rounded-md bg-muted', className)}
+ {...props}
+ />
+ );
+}
+
+export { Skeleton };
diff --git a/packages/frontend/admin/src/components/ui/slider.tsx b/packages/frontend/admin/src/components/ui/slider.tsx
new file mode 100644
index 0000000000..36d34b33e6
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/slider.tsx
@@ -0,0 +1,25 @@
+import { cn } from '@affine/admin/utils';
+import * as SliderPrimitive from '@radix-ui/react-slider';
+import * as React from 'react';
+
+const Slider = React.forwardRef<
+ React.ElementRef<typeof SliderPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
+>(({ className, ...props }, ref) => (
+ <SliderPrimitive.Root
+ ref={ref}
+ className={cn(
+ 'relative flex w-full touch-none select-none items-center',
+ className
+ )}
+ {...props}
+ >
+ <SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
+ <SliderPrimitive.Range className="absolute h-full bg-primary" />
+ </SliderPrimitive.Track>
+ <SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
+ </SliderPrimitive.Root>
+));
+Slider.displayName = SliderPrimitive.Root.displayName;
+
+export { Slider };
diff --git a/packages/frontend/admin/src/components/ui/sonner.tsx b/packages/frontend/admin/src/components/ui/sonner.tsx
new file mode 100644
index 0000000000..537e52a5b0
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/sonner.tsx
@@ -0,0 +1,29 @@
+import { useTheme } from 'next-themes';
+import { Toaster as Sonner } from 'sonner';
+
+type ToasterProps = React.ComponentProps<typeof Sonner>;
+
+const Toaster = ({ ...props }: ToasterProps) => {
+ const { theme = 'system' } = useTheme();
+
+ return (
+ <Sonner
+ theme={theme as ToasterProps['theme']}
+ className="toaster group"
+ toastOptions={{
+ classNames: {
+ toast:
+ 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
+ description: 'group-[.toast]:text-muted-foreground',
+ actionButton:
+ 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
+ cancelButton:
+ 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
+ },
+ }}
+ {...props}
+ />
+ );
+};
+
+export { Toaster };
diff --git a/packages/frontend/admin/src/components/ui/switch.tsx b/packages/frontend/admin/src/components/ui/switch.tsx
new file mode 100644
index 0000000000..4cf18b2a5b
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/switch.tsx
@@ -0,0 +1,26 @@
+import { cn } from '@affine/admin/utils';
+import * as SwitchPrimitives from '@radix-ui/react-switch';
+import * as React from 'react';
+
+const Switch = React.forwardRef<
+ React.ElementRef<typeof SwitchPrimitives.Root>,
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
+>(({ className, ...props }, ref) => (
+ <SwitchPrimitives.Root
+ className={cn(
+ 'peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
+ className
+ )}
+ {...props}
+ ref={ref}
+ >
+ <SwitchPrimitives.Thumb
+ className={cn(
+ 'pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0'
+ )}
+ />
+ </SwitchPrimitives.Root>
+));
+Switch.displayName = SwitchPrimitives.Root.displayName;
+
+export { Switch };
diff --git a/packages/frontend/admin/src/components/ui/table.tsx b/packages/frontend/admin/src/components/ui/table.tsx
new file mode 100644
index 0000000000..517a133bfb
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/table.tsx
@@ -0,0 +1,116 @@
+import { cn } from '@affine/admin/utils';
+import * as React from 'react';
+
+const Table = React.forwardRef<
+ HTMLTableElement,
+ React.HTMLAttributes<HTMLTableElement>
+>(({ className, ...props }, ref) => (
+ <div className="relative w-full overflow-auto">
+ <table
+ ref={ref}
+ className={cn('w-full caption-bottom text-sm', className)}
+ {...props}
+ />
+ </div>
+));
+Table.displayName = 'Table';
+
+const TableHeader = React.forwardRef<
+ HTMLTableSectionElement,
+ React.HTMLAttributes<HTMLTableSectionElement>
+>(({ className, ...props }, ref) => (
+ <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />
+));
+TableHeader.displayName = 'TableHeader';
+
+const TableBody = React.forwardRef<
+ HTMLTableSectionElement,
+ React.HTMLAttributes<HTMLTableSectionElement>
+>(({ className, ...props }, ref) => (
+ <tbody
+ ref={ref}
+ className={cn('[&_tr:last-child]:border-0', className)}
+ {...props}
+ />
+));
+TableBody.displayName = 'TableBody';
+
+const TableFooter = React.forwardRef<
+ HTMLTableSectionElement,
+ React.HTMLAttributes<HTMLTableSectionElement>
+>(({ className, ...props }, ref) => (
+ <tfoot
+ ref={ref}
+ className={cn(
+ 'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0',
+ className
+ )}
+ {...props}
+ />
+));
+TableFooter.displayName = 'TableFooter';
+
+const TableRow = React.forwardRef<
+ HTMLTableRowElement,
+ React.HTMLAttributes<HTMLTableRowElement>
+>(({ className, ...props }, ref) => (
+ <tr
+ ref={ref}
+ className={cn(
+ 'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
+ className
+ )}
+ {...props}
+ />
+));
+TableRow.displayName = 'TableRow';
+
+const TableHead = React.forwardRef<
+ HTMLTableCellElement,
+ React.ThHTMLAttributes<HTMLTableCellElement>
+>(({ className, ...props }, ref) => (
+ <th
+ ref={ref}
+ className={cn(
+ 'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',
+ className
+ )}
+ {...props}
+ />
+));
+TableHead.displayName = 'TableHead';
+
+const TableCell = React.forwardRef<
+ HTMLTableCellElement,
+ React.TdHTMLAttributes<HTMLTableCellElement>
+>(({ className, ...props }, ref) => (
+ <td
+ ref={ref}
+ className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}
+ {...props}
+ />
+));
+TableCell.displayName = 'TableCell';
+
+const TableCaption = React.forwardRef<
+ HTMLTableCaptionElement,
+ React.HTMLAttributes<HTMLTableCaptionElement>
+>(({ className, ...props }, ref) => (
+ <caption
+ ref={ref}
+ className={cn('mt-4 text-sm text-muted-foreground', className)}
+ {...props}
+ />
+));
+TableCaption.displayName = 'TableCaption';
+
+export {
+ Table,
+ TableBody,
+ TableCaption,
+ TableCell,
+ TableFooter,
+ TableHead,
+ TableHeader,
+ TableRow,
+};
diff --git a/packages/frontend/admin/src/components/ui/tabs.tsx b/packages/frontend/admin/src/components/ui/tabs.tsx
new file mode 100644
index 0000000000..de2d20a058
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/tabs.tsx
@@ -0,0 +1,52 @@
+import { cn } from '@affine/admin/utils';
+import * as TabsPrimitive from '@radix-ui/react-tabs';
+import * as React from 'react';
+
+const Tabs = TabsPrimitive.Root;
+
+const TabsList = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.List>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.List
+ ref={ref}
+ className={cn(
+ 'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
+ className
+ )}
+ {...props}
+ />
+));
+TabsList.displayName = TabsPrimitive.List.displayName;
+
+const TabsTrigger = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
+ className
+ )}
+ {...props}
+ />
+));
+TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
+
+const TabsContent = React.forwardRef<
+ React.ElementRef<typeof TabsPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
+>(({ className, ...props }, ref) => (
+ <TabsPrimitive.Content
+ ref={ref}
+ className={cn(
+ 'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
+ className
+ )}
+ {...props}
+ />
+));
+TabsContent.displayName = TabsPrimitive.Content.displayName;
+
+export { Tabs, TabsContent, TabsList, TabsTrigger };
diff --git a/packages/frontend/admin/src/components/ui/textarea.tsx b/packages/frontend/admin/src/components/ui/textarea.tsx
new file mode 100644
index 0000000000..22697d8d47
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/textarea.tsx
@@ -0,0 +1,23 @@
+import { cn } from '@affine/admin/utils';
+import * as React from 'react';
+
+export interface TextareaProps
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
+
+const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
+ ({ className, ...props }, ref) => {
+ return (
+ <textarea
+ className={cn(
+ 'flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ );
+ }
+);
+Textarea.displayName = 'Textarea';
+
+export { Textarea };
diff --git a/packages/frontend/admin/src/components/ui/toast.tsx b/packages/frontend/admin/src/components/ui/toast.tsx
new file mode 100644
index 0000000000..ba565261fe
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/toast.tsx
@@ -0,0 +1,126 @@
+import { cn } from '@affine/admin/utils';
+import * as ToastPrimitives from '@radix-ui/react-toast';
+import { cva, type VariantProps } from 'class-variance-authority';
+import { X } from 'lucide-react';
+import * as React from 'react';
+
+const ToastProvider = ToastPrimitives.Provider;
+
+const ToastViewport = React.forwardRef<
+ React.ElementRef<typeof ToastPrimitives.Viewport>,
+ React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
+>(({ className, ...props }, ref) => (
+ <ToastPrimitives.Viewport
+ ref={ref}
+ className={cn(
+ 'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]',
+ className
+ )}
+ {...props}
+ />
+));
+ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
+
+const toastVariants = cva(
+ 'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',
+ {
+ variants: {
+ variant: {
+ default: 'border bg-background text-foreground',
+ destructive:
+ 'destructive group border-destructive bg-destructive text-destructive-foreground',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ },
+ }
+);
+
+const Toast = React.forwardRef<
+ React.ElementRef<typeof ToastPrimitives.Root>,
+ React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
+ VariantProps<typeof toastVariants>
+>(({ className, variant, ...props }, ref) => {
+ return (
+ <ToastPrimitives.Root
+ ref={ref}
+ className={cn(toastVariants({ variant }), className)}
+ {...props}
+ />
+ );
+});
+Toast.displayName = ToastPrimitives.Root.displayName;
+
+const ToastAction = React.forwardRef<
+ React.ElementRef<typeof ToastPrimitives.Action>,
+ React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
+>(({ className, ...props }, ref) => (
+ <ToastPrimitives.Action
+ ref={ref}
+ className={cn(
+ 'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive',
+ className
+ )}
+ {...props}
+ />
+));
+ToastAction.displayName = ToastPrimitives.Action.displayName;
+
+const ToastClose = React.forwardRef<
+ React.ElementRef<typeof ToastPrimitives.Close>,
+ React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
+>(({ className, ...props }, ref) => (
+ <ToastPrimitives.Close
+ ref={ref}
+ className={cn(
+ 'absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',
+ className
+ )}
+ toast-close=""
+ {...props}
+ >
+ <X className="h-4 w-4" />
+ </ToastPrimitives.Close>
+));
+ToastClose.displayName = ToastPrimitives.Close.displayName;
+
+const ToastTitle = React.forwardRef<
+ React.ElementRef<typeof ToastPrimitives.Title>,
+ React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
+>(({ className, ...props }, ref) => (
+ <ToastPrimitives.Title
+ ref={ref}
+ className={cn('text-sm font-semibold', className)}
+ {...props}
+ />
+));
+ToastTitle.displayName = ToastPrimitives.Title.displayName;
+
+const ToastDescription = React.forwardRef<
+ React.ElementRef<typeof ToastPrimitives.Description>,
+ React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
+>(({ className, ...props }, ref) => (
+ <ToastPrimitives.Description
+ ref={ref}
+ className={cn('text-sm opacity-90', className)}
+ {...props}
+ />
+));
+ToastDescription.displayName = ToastPrimitives.Description.displayName;
+
+type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
+
+type ToastActionElement = React.ReactElement<typeof ToastAction>;
+
+export {
+ Toast,
+ ToastAction,
+ type ToastActionElement,
+ ToastClose,
+ ToastDescription,
+ type ToastProps,
+ ToastProvider,
+ ToastTitle,
+ ToastViewport,
+};
diff --git a/packages/frontend/admin/src/components/ui/toaster.tsx b/packages/frontend/admin/src/components/ui/toaster.tsx
new file mode 100644
index 0000000000..ccc286cf7f
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/toaster.tsx
@@ -0,0 +1,33 @@
+import {
+ Toast,
+ ToastClose,
+ ToastDescription,
+ ToastProvider,
+ ToastTitle,
+ ToastViewport,
+} from '@affine/admin/components/ui/toast';
+import { useToast } from '@affine/admin/components/ui/use-toast';
+
+export function Toaster() {
+ const { toasts } = useToast();
+
+ return (
+ <ToastProvider>
+ {toasts.map(function ({ id, title, description, action, ...props }) {
+ return (
+ <Toast key={id} {...props}>
+ <div className="grid gap-1">
+ {title && <ToastTitle>{title}</ToastTitle>}
+ {description && (
+ <ToastDescription>{description}</ToastDescription>
+ )}
+ </div>
+ {action}
+ <ToastClose />
+ </Toast>
+ );
+ })}
+ <ToastViewport />
+ </ToastProvider>
+ );
+}
diff --git a/packages/frontend/admin/src/components/ui/toggle-group.tsx b/packages/frontend/admin/src/components/ui/toggle-group.tsx
new file mode 100644
index 0000000000..f921cffe88
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/toggle-group.tsx
@@ -0,0 +1,58 @@
+import { toggleVariants } from '@affine/admin/components/ui/toggle';
+import { cn } from '@affine/admin/utils';
+import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
+import type { VariantProps } from 'class-variance-authority';
+import * as React from 'react';
+
+const ToggleGroupContext = React.createContext<
+ VariantProps<typeof toggleVariants>
+>({
+ size: 'default',
+ variant: 'default',
+});
+
+const ToggleGroup = React.forwardRef<
+ React.ElementRef<typeof ToggleGroupPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
+ VariantProps<typeof toggleVariants>
+>(({ className, variant, size, children, ...props }, ref) => (
+ <ToggleGroupPrimitive.Root
+ ref={ref}
+ className={cn('flex items-center justify-center gap-1', className)}
+ {...props}
+ >
+ <ToggleGroupContext.Provider value={{ variant, size }}>
+ {children}
+ </ToggleGroupContext.Provider>
+ </ToggleGroupPrimitive.Root>
+));
+
+ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
+
+const ToggleGroupItem = React.forwardRef<
+ React.ElementRef<typeof ToggleGroupPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
+ VariantProps<typeof toggleVariants>
+>(({ className, children, variant, size, ...props }, ref) => {
+ const context = React.useContext(ToggleGroupContext);
+
+ return (
+ <ToggleGroupPrimitive.Item
+ ref={ref}
+ className={cn(
+ toggleVariants({
+ variant: context.variant || variant,
+ size: context.size || size,
+ }),
+ className
+ )}
+ {...props}
+ >
+ {children}
+ </ToggleGroupPrimitive.Item>
+ );
+});
+
+ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
+
+export { ToggleGroup, ToggleGroupItem };
diff --git a/packages/frontend/admin/src/components/ui/toggle.tsx b/packages/frontend/admin/src/components/ui/toggle.tsx
new file mode 100644
index 0000000000..31c0bd2ae1
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/toggle.tsx
@@ -0,0 +1,42 @@
+import { cn } from '@affine/admin/utils';
+import * as TogglePrimitive from '@radix-ui/react-toggle';
+import { cva, type VariantProps } from 'class-variance-authority';
+import * as React from 'react';
+
+const toggleVariants = cva(
+ 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',
+ {
+ variants: {
+ variant: {
+ default: 'bg-transparent',
+ outline:
+ 'border border-input bg-transparent hover:bg-accent hover:text-accent-foreground',
+ },
+ size: {
+ default: 'h-10 px-3',
+ sm: 'h-9 px-2.5',
+ lg: 'h-11 px-5',
+ },
+ },
+ defaultVariants: {
+ variant: 'default',
+ size: 'default',
+ },
+ }
+);
+
+const Toggle = React.forwardRef<
+ React.ElementRef<typeof TogglePrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
+ VariantProps<typeof toggleVariants>
+>(({ className, variant, size, ...props }, ref) => (
+ <TogglePrimitive.Root
+ ref={ref}
+ className={cn(toggleVariants({ variant, size, className }))}
+ {...props}
+ />
+));
+
+Toggle.displayName = TogglePrimitive.Root.displayName;
+
+export { Toggle, toggleVariants };
diff --git a/packages/frontend/admin/src/components/ui/tooltip.tsx b/packages/frontend/admin/src/components/ui/tooltip.tsx
new file mode 100644
index 0000000000..6e0d2dcbb2
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/tooltip.tsx
@@ -0,0 +1,27 @@
+import { cn } from '@affine/admin/utils';
+import * as TooltipPrimitive from '@radix-ui/react-tooltip';
+import * as React from 'react';
+
+const TooltipProvider = TooltipPrimitive.Provider;
+
+const Tooltip = TooltipPrimitive.Root;
+
+const TooltipTrigger = TooltipPrimitive.Trigger;
+
+const TooltipContent = React.forwardRef<
+ React.ElementRef<typeof TooltipPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
+>(({ className, sideOffset = 4, ...props }, ref) => (
+ <TooltipPrimitive.Content
+ ref={ref}
+ sideOffset={sideOffset}
+ className={cn(
+ 'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
+ className
+ )}
+ {...props}
+ />
+));
+TooltipContent.displayName = TooltipPrimitive.Content.displayName;
+
+export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
diff --git a/packages/frontend/admin/src/components/ui/use-toast.ts b/packages/frontend/admin/src/components/ui/use-toast.ts
new file mode 100644
index 0000000000..d5bfcce7b8
--- /dev/null
+++ b/packages/frontend/admin/src/components/ui/use-toast.ts
@@ -0,0 +1,191 @@
+// Inspired by react-hot-toast library
+import type {
+ ToastActionElement,
+ ToastProps,
+} from '@affine/admin/components/ui/toast';
+import * as React from 'react';
+
+const TOAST_LIMIT = 1;
+const TOAST_REMOVE_DELAY = 1000000;
+
+type ToasterToast = ToastProps & {
+ id: string;
+ title?: React.ReactNode;
+ description?: React.ReactNode;
+ action?: ToastActionElement;
+};
+
+const actionTypes = {
+ ADD_TOAST: 'ADD_TOAST',
+ UPDATE_TOAST: 'UPDATE_TOAST',
+ DISMISS_TOAST: 'DISMISS_TOAST',
+ REMOVE_TOAST: 'REMOVE_TOAST',
+} as const;
+
+let count = 0;
+
+function genId() {
+ count = (count + 1) % Number.MAX_SAFE_INTEGER;
+ return count.toString();
+}
+
+type ActionType = typeof actionTypes;
+
+type Action =
+ | {
+ type: ActionType['ADD_TOAST'];
+ toast: ToasterToast;
+ }
+ | {
+ type: ActionType['UPDATE_TOAST'];
+ toast: Partial<ToasterToast>;
+ }
+ | {
+ type: ActionType['DISMISS_TOAST'];
+ toastId?: ToasterToast['id'];
+ }
+ | {
+ type: ActionType['REMOVE_TOAST'];
+ toastId?: ToasterToast['id'];
+ };
+
+interface State {
+ toasts: ToasterToast[];
+}
+
+const toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();
+
+const addToRemoveQueue = (toastId: string) => {
+ if (toastTimeouts.has(toastId)) {
+ return;
+ }
+
+ const timeout = setTimeout(() => {
+ toastTimeouts.delete(toastId);
+ dispatch({
+ type: 'REMOVE_TOAST',
+ toastId: toastId,
+ });
+ }, TOAST_REMOVE_DELAY);
+
+ toastTimeouts.set(toastId, timeout);
+};
+
+export const reducer = (state: State, action: Action): State => {
+ switch (action.type) {
+ case 'ADD_TOAST':
+ return {
+ ...state,
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
+ };
+
+ case 'UPDATE_TOAST':
+ return {
+ ...state,
+ toasts: state.toasts.map(t =>
+ t.id === action.toast.id ? { ...t, ...action.toast } : t
+ ),
+ };
+
+ case 'DISMISS_TOAST': {
+ const { toastId } = action;
+
+ // ! Side effects ! - This could be extracted into a dismissToast() action,
+ // but I'll keep it here for simplicity
+ if (toastId) {
+ addToRemoveQueue(toastId);
+ } else {
+ state.toasts.forEach(toast => {
+ addToRemoveQueue(toast.id);
+ });
+ }
+
+ return {
+ ...state,
+ toasts: state.toasts.map(t =>
+ t.id === toastId || toastId === undefined
+ ? {
+ ...t,
+ open: false,
+ }
+ : t
+ ),
+ };
+ }
+ case 'REMOVE_TOAST':
+ if (action.toastId === undefined) {
+ return {
+ ...state,
+ toasts: [],
+ };
+ }
+ return {
+ ...state,
+ toasts: state.toasts.filter(t => t.id !== action.toastId),
+ };
+ }
+};
+
+const listeners: Array<(state: State) => void> = [];
+
+let memoryState: State = { toasts: [] };
+
+function dispatch(action: Action) {
+ memoryState = reducer(memoryState, action);
+ listeners.forEach(listener => {
+ listener(memoryState);
+ });
+}
+
+type Toast = Omit<ToasterToast, 'id'>;
+
+function toast({ ...props }: Toast) {
+ const id = genId();
+
+ const update = (props: ToasterToast) =>
+ dispatch({
+ type: 'UPDATE_TOAST',
+ toast: { ...props, id },
+ });
+ const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id });
+
+ dispatch({
+ type: 'ADD_TOAST',
+ toast: {
+ ...props,
+ id,
+ open: true,
+ onOpenChange: open => {
+ if (!open) dismiss();
+ },
+ },
+ });
+
+ return {
+ id: id,
+ dismiss,
+ update,
+ };
+}
+
+function useToast() {
+ const [state, setState] = React.useState<State>(memoryState);
+
+ React.useEffect(() => {
+ listeners.push(setState);
+ return () => {
+ const index = listeners.indexOf(setState);
+ if (index > -1) {
+ listeners.splice(index, 1);
+ }
+ };
+ }, [state]);
+
+ return {
+ ...state,
+ toast,
+ dismiss: (toastId?: string) => dispatch({ type: 'DISMISS_TOAST', toastId }),
+ };
+}
+
+export { toast, useToast };
diff --git a/packages/frontend/admin/src/global.css b/packages/frontend/admin/src/global.css
new file mode 100644
index 0000000000..0f0ff2aa2c
--- /dev/null
+++ b/packages/frontend/admin/src/global.css
@@ -0,0 +1,76 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+@layer base {
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 240 10% 3.9%;
+
+ --card: 0 0% 100%;
+ --card-foreground: 240 10% 3.9%;
+
+ --popover: 0 0% 100%;
+ --popover-foreground: 240 10% 3.9%;
+
+ --primary: 240 5.9% 10%;
+ --primary-foreground: 0 0% 98%;
+
+ --secondary: 240 4.8% 95.9%;
+ --secondary-foreground: 240 5.9% 10%;
+
+ --muted: 240 4.8% 95.9%;
+ --muted-foreground: 240 3.8% 46.1%;
+
+ --accent: 240 4.8% 95.9%;
+ --accent-foreground: 240 5.9% 10%;
+
+ --destructive: 0 84.2% 60.2%;
+ --destructive-foreground: 0 0% 98%;
+
+ --border: 240 5.9% 90%;
+ --input: 240 5.9% 90%;
+ --ring: 240 10% 3.9%;
+
+ --radius: 0.5rem;
+ }
+
+ .dark {
+ --background: 240 10% 3.9%;
+ --foreground: 0 0% 98%;
+
+ --card: 240 10% 3.9%;
+ --card-foreground: 0 0% 98%;
+
+ --popover: 240 10% 3.9%;
+ --popover-foreground: 0 0% 98%;
+
+ --primary: 0 0% 98%;
+ --primary-foreground: 240 5.9% 10%;
+
+ --secondary: 240 3.7% 15.9%;
+ --secondary-foreground: 0 0% 98%;
+
+ --muted: 240 3.7% 15.9%;
+ --muted-foreground: 240 5% 64.9%;
+
+ --accent: 240 3.7% 15.9%;
+ --accent-foreground: 0 0% 98%;
+
+ --destructive: 0 62.8% 30.6%;
+ --destructive-foreground: 0 0% 98%;
+
+ --border: 240 3.7% 15.9%;
+ --input: 240 3.7% 15.9%;
+ --ring: 240 4.9% 83.9%;
+ }
+}
+
+@layer base {
+ * {
+ @apply border-border;
+ }
+ body {
+ @apply bg-background text-foreground;
+ }
+}
diff --git a/packages/frontend/admin/src/global.d.ts b/packages/frontend/admin/src/global.d.ts
new file mode 100644
index 0000000000..cdb2b1a9a2
--- /dev/null
+++ b/packages/frontend/admin/src/global.d.ts
@@ -0,0 +1,4 @@
+declare module '*.svg' {
+ const content: string;
+ export default content;
+}
diff --git a/packages/frontend/admin/src/index.tsx b/packages/frontend/admin/src/index.tsx
new file mode 100644
index 0000000000..ced476bc9f
--- /dev/null
+++ b/packages/frontend/admin/src/index.tsx
@@ -0,0 +1,8 @@
+import './global.css';
+
+import { createRoot } from 'react-dom/client';
+
+import { App } from './app';
+
+// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+createRoot(document.getElementById('app')!).render(<App />);
diff --git a/packages/frontend/admin/src/modules/auth/index.tsx b/packages/frontend/admin/src/modules/auth/index.tsx
new file mode 100644
index 0000000000..32d9ccd022
--- /dev/null
+++ b/packages/frontend/admin/src/modules/auth/index.tsx
@@ -0,0 +1,102 @@
+import { Button } from '@affine/admin/components/ui/button';
+import { Input } from '@affine/admin/components/ui/input';
+import { Label } from '@affine/admin/components/ui/label';
+import { FeatureType, getUserFeaturesQuery } from '@affine/graphql';
+import { useCallback, useRef } from 'react';
+import { useNavigate } from 'react-router-dom';
+import { toast } from 'sonner';
+
+import logo from './logo.svg';
+
+export function Auth() {
+ const emailRef = useRef<HTMLInputElement>(null);
+ const passwordRef = useRef<HTMLInputElement>(null);
+ const navigate = useNavigate();
+ const login = useCallback(() => {
+ if (!emailRef.current || !passwordRef.current) return;
+ fetch('/api/auth/sign-in', {
+ method: 'POST',
+ body: JSON.stringify({
+ email: emailRef.current?.value,
+ password: passwordRef.current?.value,
+ }),
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ })
+ .then(() =>
+ fetch('/graphql', {
+ method: 'POST',
+ body: JSON.stringify({
+ operationName: getUserFeaturesQuery.operationName,
+ query: getUserFeaturesQuery.query,
+ variables: {},
+ }),
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ })
+ )
+ .then(res => res.json())
+ .then(
+ ({
+ data: {
+ currentUser: { features },
+ },
+ }) => {
+ if (features.includes(FeatureType.Admin)) {
+ navigate('/admin');
+ } else {
+ toast.error('You are not an admin');
+ }
+ }
+ )
+ .catch(err => {
+ toast.error(`Failed to login: ${err.message}`);
+ });
+ }, [navigate]);
+ return (
+ <div className="w-full lg:grid lg:min-h-[600px] lg:grid-cols-2 xl:min-h-[800px]">
+ <div className="flex items-center justify-center py-12">
+ <div className="mx-auto grid w-[350px] gap-6">
+ <div className="grid gap-2 text-center">
+ <h1 className="text-3xl font-bold">Login</h1>
+ <p className="text-balance text-muted-foreground">
+ Enter your email below to login to your account
+ </p>
+ </div>
+ <div className="grid gap-4">
+ <div className="grid gap-2">
+ <Label htmlFor="email">Email</Label>
+ <Input
+ id="email"
+ type="email"
+ ref={emailRef}
+ placeholder="[email protected]"
+ required
+ />
+ </div>
+ <div className="grid gap-2">
+ <div className="flex items-center">
+ <Label htmlFor="password">Password</Label>
+ </div>
+ <Input id="password" type="password" ref={passwordRef} required />
+ </div>
+ <Button onClick={login} type="submit" className="w-full">
+ Login
+ </Button>
+ </div>
+ </div>
+ </div>
+ <div className="hidden bg-muted lg:block">
+ <img
+ src={logo}
+ alt="Image"
+ className="w-1/2 h-1/2 object-cover dark:brightness-[0.2] dark:grayscale relative top-1/4 left-1/4"
+ />
+ </div>
+ </div>
+ );
+}
+
+export { Auth as Component };
diff --git a/packages/frontend/admin/src/modules/auth/logo.svg b/packages/frontend/admin/src/modules/auth/logo.svg
new file mode 100644
index 0000000000..01ce38ef99
--- /dev/null
+++ b/packages/frontend/admin/src/modules/auth/logo.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 470 526.48">
+ <g id="_6_export">
+ <rect id="box_geometric" fill="none" width="470" height="526.48" />
+ <path id="logo-black"
+ d="m404.14,313.34c-5.95-10.33-15.86-27.48-25.65-44.42-2.97-5.14-5.92-10.25-8.75-15.15-5.82-10.08-11.12-19.27-14.9-25.83-26.23-45.33-77.87-135.08-103.67-179.46-7.95-12.37-26.37-11.39-33.21,1.42-7.76,13.45-16.3,28.24-25.32,43.87-2.86,4.96-5.78,10.01-8.73,15.12-37.58,65.08-81.56,141.26-112.89,195.52-1.6,2.9-4.58,7.63-6.07,10.76-2.61,5.65-2.1,12.69,1.19,17.91,3.71,6.18,10.65,9.57,17.74,9.22,8.53,0,26.62-.01,50.01,0,5.55,0,11.4,0,17.49,0,81.33,0,205.57.05,236.06,0,14.81.03,24.1-16.21,16.72-28.97Zm-175.07-57.64l-14.97-25.93c-2.63-4.56.66-10.26,5.92-10.26h29.94c5.27,0,8.56,5.7,5.92,10.26l-14.97,25.93c-2.63,4.56-9.21,4.56-11.85,0Zm-25.08-48.29c-1.24-3.16-2.31-6.37-3.19-9.63l49.53,9.63h-46.34Zm22.62,68.22c-2.11,2.66-4.36,5.19-6.74,7.59l-16.43-47.71,23.16,40.12Zm47.78-53.7c3.35.5,6.67,1.19,9.93,2.05l-33.1,38.08,23.17-40.13Zm-76.64-40.4c-.53-4.82-.76-9.69-.74-14.57l65.41,31.91-64.68-17.33Zm-7.76,47.77l17.32,64.65c-3.91,2.87-8.01,5.51-12.25,7.93l-5.08-72.58Zm109.93.17c4.44,1.95,8.77,4.19,12.99,6.65l-60.34,40.7,47.35-47.35Zm-101.41-83.09c1.2-8.86,3.05-17.59,5.29-25.96l99.37,86.38-104.65-60.42Zm-22.02,164.51c-8.27,3.39-16.75,6.15-25.12,8.39l25.12-129.23v120.84Zm153.49-63.19c7.07,5.47,13.71,11.44,19.84,17.56l-124.49,42.86,104.65-60.42Zm-90.64-175.85c18.32,31.79,44.92,77.89,70.26,121.77l-94.61-94.61c5.56-9.62,10.83-18.75,15.69-27.18,1.93-3.33,6.73-3.33,8.66,0Zm-147.77,240.92c5.21-8.99,12.37-21.32,13.96-24.16,15.08-26.12,35.39-61.29,56.37-97.63l-34.65,129.3c-12.41,0-23.11,0-31.35,0-3.85,0-6.26-4.17-4.33-7.5Zm282.54,7.53c-28.89,0-84.98,0-140.67,0l129.31-34.65c6.78,11.74,12.21,21.14,15.69,27.16,1.93,3.33-.48,7.49-4.32,7.49Z" />
+ <path
+ d="m115.94,486.75c-2.9,0-5.39-1.98-6.05-4.81l-4.72-20.29c-.23-1.01-1.12-1.71-2.16-1.71h-20.5c-1.04,0-1.92.7-2.16,1.71l-4.72,20.29c-.66,2.83-3.15,4.81-6.05,4.81h-2.26c-1.92,0-3.71-.87-4.89-2.39-1.19-1.52-1.6-3.46-1.14-5.32l22.17-89.41c.69-2.78,3.17-4.72,6.03-4.72h6.54c2.86,0,5.34,1.94,6.03,4.72l22.17,89.41c.46,1.87.05,3.81-1.14,5.33-1.19,1.52-2.97,2.38-4.89,2.38h-2.26Zm-23.18-82.26s-.08.01-.08.02l-8.17,39.3c-.16.71,0,1.39.41,1.93.42.53,1.05.84,1.73.84h12.21c.68,0,1.31-.31,1.73-.84.42-.53.58-1.22.42-1.88l-8.17-39.32-.09-.04Z" />
+ <path
+ d="m269.14,486.8c-3.43,0-6.21-2.79-6.21-6.21v-33.53c0-3.31-2.7-6.01-6.01-6.01h-47.88c-1.22,0-2.21.99-2.21,2.21v37.27c0,3.43-2.79,6.21-6.21,6.21h-2.56c-3.43,0-6.21-2.79-6.21-6.21v-39.49h-43.04c-1.22,0-2.21.99-2.21,2.21v37.27c0,3.43-2.79,6.21-6.21,6.21h-2.56c-3.43,0-6.21-2.79-6.21-6.21v-77.61c0-9.93,8.08-18.02,18.02-18.02h28.02c3.43,0,6.21,2.79,6.21,6.21v.95c0,3.43-2.79,6.21-6.21,6.21h-25.04c-3.31,0-6.01,2.7-6.01,6.01v21.15c0,1.22.99,2.21,2.21,2.21h43.04v-24.74c0-9.93,8.08-18.02,18.02-18.02h28.02c3.43,0,6.21,2.79,6.21,6.21v.95c0,3.43-2.79,6.21-6.21,6.21h-25.04c-3.31,0-6.01,2.7-6.01,6.01v21.15c0,1.22.99,2.21,2.21,2.21h50.59c9.93,0,18.02,8.08,18.02,18.02v34.9c0,3.43-2.79,6.21-6.21,6.21h-2.29Z" />
+ <path
+ d="m332.61,485.75c-2.32,0-4.39-1.56-5.02-3.8l-19.11-67.64-1.96.27-.21,65.97c0,2.87-2.35,5.2-5.21,5.2h-2.31c-2.88,0-5.21-2.34-5.21-5.21v-89.41c0-2.88,2.34-5.21,5.21-5.21h10.02c2.32,0,4.39,1.56,5.02,3.8l19.11,67.64,1.96-.27.21-65.97c0-2.87,2.35-5.2,5.21-5.2h2.31c2.88,0,5.21,2.34,5.21,5.21v89.41c0,2.88-2.34,5.21-5.21,5.21h-10.02Z" />
+ <path
+ d="m376.06,486.75c-9.93,0-18.02-8.08-18.02-18.02v-65.81c0-9.93,8.08-18.02,18.02-18.02h26.68c3.43,0,6.21,2.79,6.21,6.21v.95c0,3.43-2.79,6.21-6.21,6.21h-23.83c-3.31,0-6.01,2.7-6.01,6.01v19.81c0,1.22.99,2.21,2.21,2.21h26.28c3.43,0,6.21,2.79,6.21,6.21v.95c0,3.43-2.79,6.21-6.21,6.21h-26.28c-1.22,0-2.21.99-2.21,2.21v25.44c0,3.31,2.7,6.01,6.01,6.01h23.83c3.43,0,6.21,2.79,6.21,6.21v.95c0,3.43-2.79,6.21-6.21,6.21h-26.68Z" />
+ <path
+ d="m263.69,418.27c-1.67,0-3.28-.8-4.3-2.14-1.03-1.35-1.37-3.06-.93-4.71l3.1-11.56c.64-2.37,2.8-4.03,5.27-4.03,1.44,0,2.8.57,3.83,1.59l8.46,8.46c1.39,1.39,1.92,3.35,1.41,5.25-.51,1.9-1.95,3.34-3.84,3.84l-11.56,3.1c-.47.13-.95.19-1.42.19h0Z" />
+ </g>
+</svg>
diff --git a/packages/frontend/admin/src/modules/home/index.tsx b/packages/frontend/admin/src/modules/home/index.tsx
new file mode 100644
index 0000000000..8659f8109b
--- /dev/null
+++ b/packages/frontend/admin/src/modules/home/index.tsx
@@ -0,0 +1,304 @@
+import {
+ Avatar,
+ AvatarFallback,
+ AvatarImage,
+} from '@affine/admin/components/ui/avatar';
+import { Badge } from '@affine/admin/components/ui/badge';
+import { Button } from '@affine/admin/components/ui/button';
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from '@affine/admin/components/ui/card';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from '@affine/admin/components/ui/table';
+import {
+ Activity,
+ ArrowUpRight,
+ CreditCard,
+ DollarSign,
+ Users,
+} from 'lucide-react';
+import { Link } from 'react-router-dom';
+
+import { Nav } from '../nav';
+
+export function Dashboard() {
+ return (
+ <Nav>
+ <main className="flex flex-1 flex-col gap-4 p-4 md:gap-8 md:p-8">
+ <MainDashBoard />
+ </main>
+ </Nav>
+ );
+}
+
+function MainDashBoard() {
+ return (
+ <>
+ <div className="grid gap-4 md:grid-cols-2 md:gap-8 lg:grid-cols-4">
+ <Card x-chunk="dashboard-01-chunk-0">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium">Total Revenue</CardTitle>
+ <DollarSign className="h-4 w-4 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-2xl font-bold">$45,231.89</div>
+ <p className="text-xs text-muted-foreground">
+ +20.1% from last month
+ </p>
+ </CardContent>
+ </Card>
+ <Card x-chunk="dashboard-01-chunk-1">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium">Subscriptions</CardTitle>
+ <Users className="h-4 w-4 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-2xl font-bold">+2350</div>
+ <p className="text-xs text-muted-foreground">
+ +180.1% from last month
+ </p>
+ </CardContent>
+ </Card>
+ <Card x-chunk="dashboard-01-chunk-2">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium">Sales</CardTitle>
+ <CreditCard className="h-4 w-4 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-2xl font-bold">+12,234</div>
+ <p className="text-xs text-muted-foreground">
+ +19% from last month
+ </p>
+ </CardContent>
+ </Card>
+ <Card x-chunk="dashboard-01-chunk-3">
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
+ <CardTitle className="text-sm font-medium">Active Now</CardTitle>
+ <Activity className="h-4 w-4 text-muted-foreground" />
+ </CardHeader>
+ <CardContent>
+ <div className="text-2xl font-bold">+573</div>
+ <p className="text-xs text-muted-foreground">
+ +201 since last hour
+ </p>
+ </CardContent>
+ </Card>
+ </div>
+ <div className="grid gap-4 md:gap-8 lg:grid-cols-2 xl:grid-cols-3">
+ <Card className="xl:col-span-2" x-chunk="dashboard-01-chunk-4">
+ <CardHeader className="flex flex-row items-center">
+ <div className="grid gap-2">
+ <CardTitle>Transactions</CardTitle>
+ <CardDescription>
+ Recent transactions from your store.
+ </CardDescription>
+ </div>
+ <Button asChild size="sm" className="ml-auto gap-1">
+ <Link to="/">
+ View All
+ <ArrowUpRight className="h-4 w-4" />
+ </Link>
+ </Button>
+ </CardHeader>
+ <CardContent>
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead>Customer</TableHead>
+ <TableHead className="hidden xl:table-column">Type</TableHead>
+ <TableHead className="hidden xl:table-column">
+ Status
+ </TableHead>
+ <TableHead className="hidden xl:table-column">Date</TableHead>
+ <TableHead className="text-right">Amount</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>
+ <TableRow>
+ <TableCell>
+ <div className="font-medium">Liam Johnson</div>
+ <div className="hidden text-sm text-muted-foreground md:inline">
+ </div>
+ </TableCell>
+ <TableCell className="hidden xl:table-column">Sale</TableCell>
+ <TableCell className="hidden xl:table-column">
+ <Badge className="text-xs" variant="outline">
+ Approved
+ </Badge>
+ </TableCell>
+ <TableCell className="hidden md:table-cell lg:hidden xl:table-column">
+ 2023-06-23
+ </TableCell>
+ <TableCell className="text-right">$250.00</TableCell>
+ </TableRow>
+ <TableRow>
+ <TableCell>
+ <div className="font-medium">Olivia Smith</div>
+ <div className="hidden text-sm text-muted-foreground md:inline">
+ </div>
+ </TableCell>
+ <TableCell className="hidden xl:table-column">
+ Refund
+ </TableCell>
+ <TableCell className="hidden xl:table-column">
+ <Badge className="text-xs" variant="outline">
+ Declined
+ </Badge>
+ </TableCell>
+ <TableCell className="hidden md:table-cell lg:hidden xl:table-column">
+ 2023-06-24
+ </TableCell>
+ <TableCell className="text-right">$150.00</TableCell>
+ </TableRow>
+ <TableRow>
+ <TableCell>
+ <div className="font-medium">Noah Williams</div>
+ <div className="hidden text-sm text-muted-foreground md:inline">
+ </div>
+ </TableCell>
+ <TableCell className="hidden xl:table-column">
+ Subscription
+ </TableCell>
+ <TableCell className="hidden xl:table-column">
+ <Badge className="text-xs" variant="outline">
+ Approved
+ </Badge>
+ </TableCell>
+ <TableCell className="hidden md:table-cell lg:hidden xl:table-column">
+ 2023-06-25
+ </TableCell>
+ <TableCell className="text-right">$350.00</TableCell>
+ </TableRow>
+ <TableRow>
+ <TableCell>
+ <div className="font-medium">Emma Brown</div>
+ <div className="hidden text-sm text-muted-foreground md:inline">
+ </div>
+ </TableCell>
+ <TableCell className="hidden xl:table-column">Sale</TableCell>
+ <TableCell className="hidden xl:table-column">
+ <Badge className="text-xs" variant="outline">
+ Approved
+ </Badge>
+ </TableCell>
+ <TableCell className="hidden md:table-cell lg:hidden xl:table-column">
+ 2023-06-26
+ </TableCell>
+ <TableCell className="text-right">$450.00</TableCell>
+ </TableRow>
+ <TableRow>
+ <TableCell>
+ <div className="font-medium">Liam Johnson</div>
+ <div className="hidden text-sm text-muted-foreground md:inline">
+ </div>
+ </TableCell>
+ <TableCell className="hidden xl:table-column">Sale</TableCell>
+ <TableCell className="hidden xl:table-column">
+ <Badge className="text-xs" variant="outline">
+ Approved
+ </Badge>
+ </TableCell>
+ <TableCell className="hidden md:table-cell lg:hidden xl:table-column">
+ 2023-06-27
+ </TableCell>
+ <TableCell className="text-right">$550.00</TableCell>
+ </TableRow>
+ </TableBody>
+ </Table>
+ </CardContent>
+ </Card>
+ <Card x-chunk="dashboard-01-chunk-5">
+ <CardHeader>
+ <CardTitle>Recent Sales</CardTitle>
+ </CardHeader>
+ <CardContent className="grid gap-8">
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/01.png" alt="Avatar" />
+ <AvatarFallback>OM</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">
+ Olivia Martin
+ </p>
+ <p className="text-sm text-muted-foreground">
+ </p>
+ </div>
+ <div className="ml-auto font-medium">+$1,999.00</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/02.png" alt="Avatar" />
+ <AvatarFallback>JL</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">Jackson Lee</p>
+ <p className="text-sm text-muted-foreground">
+ </p>
+ </div>
+ <div className="ml-auto font-medium">+$39.00</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/03.png" alt="Avatar" />
+ <AvatarFallback>IN</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">
+ Isabella Nguyen
+ </p>
+ <p className="text-sm text-muted-foreground">
+ </p>
+ </div>
+ <div className="ml-auto font-medium">+$299.00</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/04.png" alt="Avatar" />
+ <AvatarFallback>WK</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">William Kim</p>
+ <p className="text-sm text-muted-foreground">[email protected]</p>
+ </div>
+ <div className="ml-auto font-medium">+$99.00</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/05.png" alt="Avatar" />
+ <AvatarFallback>SD</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">Sofia Davis</p>
+ <p className="text-sm text-muted-foreground">
+ </p>
+ </div>
+ <div className="ml-auto font-medium">+$39.00</div>
+ </div>
+ </CardContent>
+ </Card>
+ </div>
+ </>
+ );
+}
+
+export { Dashboard as Component };
diff --git a/packages/frontend/admin/src/modules/nav/index.tsx b/packages/frontend/admin/src/modules/nav/index.tsx
new file mode 100644
index 0000000000..9c30202007
--- /dev/null
+++ b/packages/frontend/admin/src/modules/nav/index.tsx
@@ -0,0 +1,113 @@
+import { Button } from '@affine/admin/components/ui/button';
+import {
+ Sheet,
+ SheetContent,
+ SheetTrigger,
+} from '@affine/admin/components/ui/sheet';
+import { Menu, Package2 } from 'lucide-react';
+import type { PropsWithChildren } from 'react';
+import { Link } from 'react-router-dom';
+
+import { UserDropdown } from './user-dropdown';
+
+export function Nav({ children }: PropsWithChildren<unknown>) {
+ return (
+ <div className="flex min-h-screen w-full flex-col">
+ <header className="sticky top-0 flex h-16 items-center gap-4 border-b bg-background px-4 md:px-6">
+ <nav className="hidden flex-col gap-6 text-lg font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6">
+ <Link
+ to="/"
+ className="flex items-center gap-2 text-lg font-semibold md:text-base"
+ >
+ <Package2 className="h-6 w-6" />
+ <span className="sr-only">AFFiNE</span>
+ </Link>
+ <Link
+ to="/"
+ className="text-foreground transition-colors hover:text-foreground"
+ >
+ Dashboard
+ </Link>
+ <Link
+ to="/admin/users"
+ className="text-muted-foreground transition-colors hover:text-foreground"
+ >
+ Users
+ </Link>
+ <Link
+ to="/"
+ className="text-muted-foreground transition-colors hover:text-foreground"
+ >
+ Configs
+ </Link>
+ <Link
+ to="/"
+ className="text-muted-foreground transition-colors hover:text-foreground"
+ >
+ Backups
+ </Link>
+ <Link
+ to="/"
+ className="text-muted-foreground transition-colors hover:text-foreground"
+ >
+ Analytics
+ </Link>
+ </nav>
+ <Sheet>
+ <SheetTrigger asChild>
+ <Button
+ variant="outline"
+ size="icon"
+ className="shrink-0 md:hidden"
+ >
+ <Menu className="h-5 w-5" />
+ <span className="sr-only">Toggle navigation menu</span>
+ </Button>
+ </SheetTrigger>
+ <SheetContent side="left">
+ <nav className="grid gap-6 text-lg font-medium">
+ <Link
+ to="/"
+ className="flex items-center gap-2 text-lg font-semibold"
+ >
+ <Package2 className="h-6 w-6" />
+ <span className="sr-only">Acme Inc</span>
+ </Link>
+ <Link to="/" className="hover:text-foreground">
+ Dashboard
+ </Link>
+ <Link
+ to="/"
+ className="text-muted-foreground hover:text-foreground"
+ >
+ Orders
+ </Link>
+ <Link
+ to="/"
+ className="text-muted-foreground hover:text-foreground"
+ >
+ Products
+ </Link>
+ <Link
+ to="/"
+ className="text-muted-foreground hover:text-foreground"
+ >
+ Customers
+ </Link>
+ <Link
+ to="/"
+ className="text-muted-foreground hover:text-foreground"
+ >
+ Analytics
+ </Link>
+ </nav>
+ </SheetContent>
+ </Sheet>
+ <div className="flex w-full items-center justify-end gap-4 md:ml-auto md:gap-2 lg:gap-4">
+ <UserDropdown />
+ </div>
+ </header>
+ {children}
+ </div>
+ );
+}
diff --git a/packages/frontend/admin/src/modules/nav/user-dropdown.tsx b/packages/frontend/admin/src/modules/nav/user-dropdown.tsx
new file mode 100644
index 0000000000..aa20ff8e59
--- /dev/null
+++ b/packages/frontend/admin/src/modules/nav/user-dropdown.tsx
@@ -0,0 +1,59 @@
+import { Button } from '@affine/admin/components/ui/button';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from '@affine/admin/components/ui/dropdown-menu';
+import { useQuery } from '@affine/core/hooks/use-query';
+import { FeatureType, getCurrentUserFeaturesQuery } from '@affine/graphql';
+import { CircleUser } from 'lucide-react';
+import { useEffect } from 'react';
+import { useNavigate } from 'react-router-dom';
+import { toast } from 'sonner';
+
+export function UserDropdown() {
+ const {
+ data: { currentUser },
+ } = useQuery({
+ query: getCurrentUserFeaturesQuery,
+ });
+ const navigate = useNavigate();
+
+ useEffect(() => {
+ if (!currentUser) {
+ navigate('/admin/auth');
+ return;
+ }
+ if (!currentUser?.features.includes?.(FeatureType.Admin)) {
+ toast.error('You are not an admin, please login the admin account.');
+ navigate('/admin/auth');
+ return;
+ }
+ }, [currentUser, navigate]);
+ const avatar = currentUser?.avatarUrl ? (
+ <img src={currentUser?.avatarUrl} />
+ ) : (
+ <CircleUser size={24} />
+ );
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="secondary" size="icon" className="rounded-full">
+ {avatar}
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuLabel>{currentUser?.name}</DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem>Settings</DropdownMenuItem>
+ <DropdownMenuItem>Support</DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem>Logout</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/packages/frontend/admin/src/modules/users/index.tsx b/packages/frontend/admin/src/modules/users/index.tsx
new file mode 100644
index 0000000000..f05508cfb0
--- /dev/null
+++ b/packages/frontend/admin/src/modules/users/index.tsx
@@ -0,0 +1,194 @@
+import { Badge } from '@affine/admin/components/ui/badge';
+import { Button } from '@affine/admin/components/ui/button';
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from '@affine/admin/components/ui/card';
+import {
+ DropdownMenu,
+ DropdownMenuCheckboxItem,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from '@affine/admin/components/ui/dropdown-menu';
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from '@affine/admin/components/ui/table';
+import {
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger,
+} from '@affine/admin/components/ui/tabs';
+import { useQuery } from '@affine/core/hooks/use-query';
+import { listUsersQuery } from '@affine/graphql';
+import {
+ CircleUser,
+ File,
+ ListFilter,
+ MoreHorizontal,
+ PlusCircle,
+} from 'lucide-react';
+
+import { Nav } from '../nav';
+
+export function Users() {
+ const {
+ data: { users },
+ } = useQuery({
+ query: listUsersQuery,
+ variables: {
+ filter: {
+ first: 10,
+ skip: 0,
+ },
+ },
+ });
+
+ const usersCells = users.map(user => {
+ const avatar = user.avatarUrl ? (
+ <img
+ alt="User avatar"
+ className="aspect-square rounded-md object-cover"
+ height="64"
+ src={user.avatarUrl}
+ width="64"
+ />
+ ) : (
+ <CircleUser size={36} />
+ );
+ return (
+ <TableRow key={user.id}>
+ <TableCell className="hidden sm:table-cell">{avatar}</TableCell>
+ <TableCell className="hidden md:table-cell">{user.id}</TableCell>
+ <TableCell className="font-medium">{user.name}</TableCell>
+ <TableCell>
+ <Badge variant="outline">
+ {user.emailVerified ? 'Email Verified' : 'Not yet verified'}
+ </Badge>
+ </TableCell>
+ <TableCell>{user.email}</TableCell>
+ <TableCell className="hidden md:table-cell">
+ {user.hasPassword ? '✅' : '❌'}
+ </TableCell>
+ <TableCell>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button aria-haspopup="true" size="icon" variant="ghost">
+ <MoreHorizontal className="h-4 w-4" />
+ <span className="sr-only">Toggle menu</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuLabel>Actions</DropdownMenuLabel>
+ <DropdownMenuItem>Edit</DropdownMenuItem>
+ <DropdownMenuItem>Delete</DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </TableCell>
+ </TableRow>
+ );
+ });
+
+ return (
+ <Nav>
+ <main className="flex flex-1 flex-col gap-4 p-4 md:gap-8 md:p-8">
+ <Tabs defaultValue="all">
+ <div className="flex items-center">
+ <TabsList>
+ <TabsTrigger value="all">All</TabsTrigger>
+ <TabsTrigger value="active">Active</TabsTrigger>
+ <TabsTrigger value="draft">Draft</TabsTrigger>
+ <TabsTrigger value="archived" className="hidden sm:flex">
+ Archived
+ </TabsTrigger>
+ </TabsList>
+ <div className="ml-auto flex items-center gap-2">
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="outline" size="sm" className="h-7 gap-1">
+ <ListFilter className="h-3.5 w-3.5" />
+ <span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
+ Filter
+ </span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuLabel>Filter by</DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ <DropdownMenuCheckboxItem checked>
+ Active
+ </DropdownMenuCheckboxItem>
+ <DropdownMenuCheckboxItem>Draft</DropdownMenuCheckboxItem>
+ <DropdownMenuCheckboxItem>Archived</DropdownMenuCheckboxItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ <Button size="sm" variant="outline" className="h-7 gap-1">
+ <File className="h-3.5 w-3.5" />
+ <span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
+ Export
+ </span>
+ </Button>
+ <Button size="sm" className="h-7 gap-1">
+ <PlusCircle className="h-3.5 w-3.5" />
+ <span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
+ Add User
+ </span>
+ </Button>
+ </div>
+ </div>
+ <TabsContent value="all">
+ <Card x-chunk="dashboard-06-chunk-0">
+ <CardHeader>
+ <CardTitle>Users</CardTitle>
+ <CardDescription>
+ Manage your users and edit their properties.
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <Table>
+ <TableHeader>
+ <TableRow>
+ <TableHead className="hidden w-[100px] sm:table-cell">
+ <span className="sr-only">Image</span>
+ </TableHead>
+ <TableHead className="hidden md:table-cell">Id</TableHead>
+ <TableHead>Name</TableHead>
+ <TableHead>Status</TableHead>
+ <TableHead>Email</TableHead>
+ <TableHead className="hidden md:table-cell">
+ Has password
+ </TableHead>
+ <TableHead>
+ <span className="sr-only">Actions</span>
+ </TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody>{usersCells}</TableBody>
+ </Table>
+ </CardContent>
+ <CardFooter>
+ <div className="text-xs text-muted-foreground">
+ Showing <strong>1-10</strong> of <strong>32</strong> products
+ </div>
+ </CardFooter>
+ </Card>
+ </TabsContent>
+ </Tabs>
+ </main>
+ </Nav>
+ );
+}
+
+export { Users as Component };
diff --git a/packages/frontend/admin/src/utils.ts b/packages/frontend/admin/src/utils.ts
new file mode 100644
index 0000000000..9ad0df4269
--- /dev/null
+++ b/packages/frontend/admin/src/utils.ts
@@ -0,0 +1,6 @@
+import { type ClassValue, clsx } from 'clsx';
+import { twMerge } from 'tailwind-merge';
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs));
+}
diff --git a/packages/frontend/admin/tailwind.config.js b/packages/frontend/admin/tailwind.config.js
new file mode 100644
index 0000000000..ee3b0653cb
--- /dev/null
+++ b/packages/frontend/admin/tailwind.config.js
@@ -0,0 +1,72 @@
+/** @type {import('tailwindcss').Config} */
+module.exports = {
+ darkMode: ['class'],
+ content: ['./src/**/*.{ts,tsx}'],
+ prefix: '',
+ theme: {
+ container: {
+ center: true,
+ padding: '2rem',
+ screens: {
+ '2xl': '1400px',
+ },
+ },
+ extend: {
+ colors: {
+ border: 'hsl(var(--border))',
+ input: 'hsl(var(--input))',
+ ring: 'hsl(var(--ring))',
+ background: 'hsl(var(--background))',
+ foreground: 'hsl(var(--foreground))',
+ primary: {
+ DEFAULT: 'hsl(var(--primary))',
+ foreground: 'hsl(var(--primary-foreground))',
+ },
+ secondary: {
+ DEFAULT: 'hsl(var(--secondary))',
+ foreground: 'hsl(var(--secondary-foreground))',
+ },
+ destructive: {
+ DEFAULT: 'hsl(var(--destructive))',
+ foreground: 'hsl(var(--destructive-foreground))',
+ },
+ muted: {
+ DEFAULT: 'hsl(var(--muted))',
+ foreground: 'hsl(var(--muted-foreground))',
+ },
+ accent: {
+ DEFAULT: 'hsl(var(--accent))',
+ foreground: 'hsl(var(--accent-foreground))',
+ },
+ popover: {
+ DEFAULT: 'hsl(var(--popover))',
+ foreground: 'hsl(var(--popover-foreground))',
+ },
+ card: {
+ DEFAULT: 'hsl(var(--card))',
+ foreground: 'hsl(var(--card-foreground))',
+ },
+ },
+ borderRadius: {
+ lg: 'var(--radius)',
+ md: 'calc(var(--radius) - 2px)',
+ sm: 'calc(var(--radius) - 4px)',
+ },
+ keyframes: {
+ 'accordion-down': {
+ from: { height: '0' },
+ to: { height: 'var(--radix-accordion-content-height)' },
+ },
+ 'accordion-up': {
+ from: { height: 'var(--radix-accordion-content-height)' },
+ to: { height: '0' },
+ },
+ },
+ animation: {
+ 'accordion-down': 'accordion-down 0.2s ease-out',
+ 'accordion-up': 'accordion-up 0.2s ease-out',
+ },
+ },
+ },
+ plugins: [require('tailwindcss-animate')],
+};
diff --git a/packages/frontend/admin/tsconfig.json b/packages/frontend/admin/tsconfig.json
new file mode 100644
index 0000000000..e5c29a26b4
--- /dev/null
+++ b/packages/frontend/admin/tsconfig.json
@@ -0,0 +1,13 @@
+{
+ "extends": "../../../tsconfig.json",
+ "include": ["./src"],
+ "compilerOptions": {
+ "outDir": "./dist",
+ "allowJs": true,
+ "composite": true,
+ "verbatimModuleSyntax": false,
+ "jsx": "react-jsx"
+ },
+ "references": [{ "path": "../core" }, { "path": "../graphql" }],
+ "exclude": ["dist"]
+}
diff --git a/packages/frontend/core/package.json b/packages/frontend/core/package.json
index 67af284756..ab065af531 100644
--- a/packages/frontend/core/package.json
+++ b/packages/frontend/core/package.json
@@ -7,8 +7,12 @@
"./app": "./src/app.tsx",
"./router": "./src/router.tsx",
"./bootstrap/register-plugins": "./src/bootstrap/register-plugins.ts",
+ "./hooks/*": "./src/hooks/*",
"./*": "./src/*"
},
+ "sideEffects": [
+ "./src/**/*.css"
+ ],
"dependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/component": "workspace:*",
diff --git a/packages/frontend/core/src/telemetry.tsx b/packages/frontend/core/src/telemetry.tsx
index ba78fcb08f..c949920001 100644
--- a/packages/frontend/core/src/telemetry.tsx
+++ b/packages/frontend/core/src/telemetry.tsx
@@ -2,7 +2,7 @@ import { appSettingAtom } from '@toeverything/infra';
import { useAtomValue } from 'jotai/react';
import { useLayoutEffect } from 'react';
-import { mixpanel } from './utils';
+import { mixpanel } from './utils/mixpanel';
export function Telemetry() {
const settings = useAtomValue(appSettingAtom);
diff --git a/packages/frontend/graphql/package.json b/packages/frontend/graphql/package.json
index 1fb03ab7cb..4c8c697d46 100644
--- a/packages/frontend/graphql/package.json
+++ b/packages/frontend/graphql/package.json
@@ -9,6 +9,7 @@
"exports": {
".": "./src/index.ts"
},
+ "sideEffects": "false",
"devDependencies": {
"@graphql-codegen/add": "^5.0.2",
"@graphql-codegen/cli": "5.0.2",
diff --git a/packages/frontend/graphql/src/graphql/get-current-user-features.gql b/packages/frontend/graphql/src/graphql/get-current-user-features.gql
new file mode 100644
index 0000000000..6cd2d4af99
--- /dev/null
+++ b/packages/frontend/graphql/src/graphql/get-current-user-features.gql
@@ -0,0 +1,11 @@
+# for the admin panel only, do not use it in the app
+query getCurrentUserFeatures {
+ currentUser {
+ id
+ name
+ email
+ emailVerified
+ avatarUrl
+ features
+ }
+}
diff --git a/packages/frontend/graphql/src/graphql/index.ts b/packages/frontend/graphql/src/graphql/index.ts
index 59781c32aa..e7703f83b6 100644
--- a/packages/frontend/graphql/src/graphql/index.ts
+++ b/packages/frontend/graphql/src/graphql/index.ts
@@ -283,6 +283,24 @@ query getCopilotSessions($workspaceId: String!) {
}`,
};
+export const getCurrentUserFeaturesQuery = {
+ id: 'getCurrentUserFeaturesQuery' as const,
+ operationName: 'getCurrentUserFeatures',
+ definitionName: 'currentUser',
+ containsFile: false,
+ query: `
+query getCurrentUserFeatures {
+ currentUser {
+ id
+ name
+ email
+ emailVerified
+ avatarUrl
+ features
+ }
+}`,
+};
+
export const getCurrentUserQuery = {
id: 'getCurrentUserQuery' as const,
operationName: 'getCurrentUser',
@@ -597,6 +615,34 @@ mutation leaveWorkspace($workspaceId: String!, $workspaceName: String!, $sendLea
}`,
};
+export const listUsersQuery = {
+ id: 'listUsersQuery' as const,
+ operationName: 'listUsers',
+ definitionName: 'users',
+ containsFile: false,
+ query: `
+query listUsers($filter: ListUserInput!) {
+ users(filter: $filter) {
+ id
+ name
+ email
+ features
+ hasPassword
+ emailVerified
+ avatarUrl
+ quota {
+ humanReadable {
+ blobLimit
+ historyPeriod
+ memberLimit
+ name
+ storageQuota
+ }
+ }
+ }
+}`,
+};
+
export const pricesQuery = {
id: 'pricesQuery' as const,
operationName: 'prices',
diff --git a/packages/frontend/graphql/src/graphql/list-users.gql b/packages/frontend/graphql/src/graphql/list-users.gql
new file mode 100644
index 0000000000..2fe496283d
--- /dev/null
+++ b/packages/frontend/graphql/src/graphql/list-users.gql
@@ -0,0 +1,20 @@
+query listUsers($filter: ListUserInput!) {
+ users(filter: $filter) {
+ id
+ name
+ email
+ features
+ hasPassword
+ emailVerified
+ avatarUrl
+ quota {
+ humanReadable {
+ blobLimit
+ historyPeriod
+ memberLimit
+ name
+ storageQuota
+ }
+ }
+ }
+}
diff --git a/packages/frontend/graphql/src/schema.ts b/packages/frontend/graphql/src/schema.ts
index 9d7cade5f8..dc969b8cf7 100644
--- a/packages/frontend/graphql/src/schema.ts
+++ b/packages/frontend/graphql/src/schema.ts
@@ -1391,6 +1391,23 @@ export type GetCopilotSessionsQuery = {
} | null;
};
+export type GetCurrentUserFeaturesQueryVariables = Exact<{
+ [key: string]: never;
+}>;
+
+export type GetCurrentUserFeaturesQuery = {
+ __typename?: 'Query';
+ currentUser: {
+ __typename?: 'UserType';
+ id: string;
+ name: string;
+ email: string;
+ emailVerified: boolean;
+ avatarUrl: string | null;
+ features: Array<FeatureType>;
+ } | null;
+};
+
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never }>;
export type GetCurrentUserQuery = {
@@ -1664,6 +1681,35 @@ export type LeaveWorkspaceMutation = {
leaveWorkspace: boolean;
};
+export type ListUsersQueryVariables = Exact<{
+ filter: ListUserInput;
+}>;
+
+export type ListUsersQuery = {
+ __typename?: 'Query';
+ users: Array<{
+ __typename?: 'UserType';
+ id: string;
+ name: string;
+ email: string;
+ features: Array<FeatureType>;
+ hasPassword: boolean | null;
+ emailVerified: boolean;
+ avatarUrl: string | null;
+ quota: {
+ __typename?: 'UserQuota';
+ humanReadable: {
+ __typename?: 'UserQuotaHumanReadable';
+ blobLimit: string;
+ historyPeriod: string;
+ memberLimit: string;
+ name: string;
+ storageQuota: string;
+ };
+ } | null;
+ }>;
+};
+
export type PricesQueryVariables = Exact<{ [key: string]: never }>;
export type PricesQuery = {
@@ -2086,6 +2132,11 @@ export type Queries =
variables: GetCopilotSessionsQueryVariables;
response: GetCopilotSessionsQuery;
}
+ | {
+ name: 'getCurrentUserFeaturesQuery';
+ variables: GetCurrentUserFeaturesQueryVariables;
+ response: GetCurrentUserFeaturesQuery;
+ }
| {
name: 'getCurrentUserQuery';
variables: GetCurrentUserQueryVariables;
@@ -2176,6 +2227,11 @@ export type Queries =
variables: InvoicesQueryVariables;
response: InvoicesQuery;
}
+ | {
+ name: 'listUsersQuery';
+ variables: ListUsersQueryVariables;
+ response: ListUsersQuery;
+ }
| {
name: 'pricesQuery';
variables: PricesQueryVariables;
diff --git a/tools/cli/package.json b/tools/cli/package.json
index 28d7310926..8e248866b3 100644
--- a/tools/cli/package.json
+++ b/tools/cli/package.json
@@ -16,6 +16,7 @@
"@sentry/webpack-plugin": "^2.16.1",
"@types/webpack-env": "^1.18.4",
"@vanilla-extract/webpack-plugin": "^2.3.7",
+ "autoprefixer": "^10.4.19",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.1",
"cssnano": "^7.0.0",
@@ -24,11 +25,13 @@
"lodash-es": "^4.17.21",
"mime-types": "^2.1.35",
"mini-css-extract-plugin": "^2.8.1",
+ "postcss": "^8.4.38",
"postcss-loader": "^8.1.1",
"raw-loader": "^4.0.2",
"source-map-loader": "^5.0.0",
"style-loader": "^4.0.0",
"swc-loader": "^0.2.6",
+ "tailwindcss": "^3.4.4",
"terser-webpack-plugin": "^5.3.10",
"thread-loader": "^4.0.2",
"ts-node": "^10.9.2",
diff --git a/tools/cli/src/bin/build.ts b/tools/cli/src/bin/build.ts
index ba767c754b..05f042e104 100644
--- a/tools/cli/src/bin/build.ts
+++ b/tools/cli/src/bin/build.ts
@@ -1,14 +1,10 @@
-import path from 'node:path';
-
import webpack from 'webpack';
+import { getCwdFromDistribution } from '../config/cwd.cjs';
import type { BuildFlags } from '../config/index.js';
-import { projectRoot } from '../config/index.js';
import { buildI18N } from '../util/i18n.js';
import { createWebpackConfig } from '../webpack/webpack.config.js';
-let cwd: string;
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const buildType = process.env.BUILD_TYPE_OVERRIDE || process.env.BUILD_TYPE;
@@ -37,24 +33,14 @@ let entry: string | undefined;
const { DISTRIBUTION } = process.env;
-const getDistribution = () => {
- switch (DISTRIBUTION) {
- case 'browser':
- case undefined:
- cwd = path.join(projectRoot, 'packages/frontend/web');
- return 'browser';
- case 'desktop':
- cwd = path.join(projectRoot, 'packages/frontend/electron/renderer');
- entry = path.join(cwd, 'index.tsx');
- return DISTRIBUTION;
- default: {
- throw new Error('DISTRIBUTION must be one of browser, desktop');
- }
- }
-};
+const cwd = getCwdFromDistribution(DISTRIBUTION);
+
+if (DISTRIBUTION === 'desktop') {
+ entry = './index.tsx';
+}
const flags = {
- distribution: getDistribution(),
+ distribution: DISTRIBUTION as BuildFlags['distribution'],
mode: 'production',
channel: getChannel(),
coverage: process.env.COVERAGE === 'true',
diff --git a/tools/cli/src/bin/dev.ts b/tools/cli/src/bin/dev.ts
index dd80e02db0..36d273e13b 100644
--- a/tools/cli/src/bin/dev.ts
+++ b/tools/cli/src/bin/dev.ts
@@ -6,8 +6,8 @@ import { config } from 'dotenv';
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
+import { getCwdFromDistribution, projectRoot } from '../config/cwd.cjs';
import type { BuildFlags } from '../config/index.js';
-import { projectRoot } from '../config/index.js';
import { watchI18N } from '../util/i18n.js';
import { createWebpackConfig } from '../webpack/webpack.config.js';
@@ -46,6 +46,9 @@ const buildFlags = process.argv.includes('--static')
{
value: 'desktop',
},
+ {
+ value: 'admin',
+ },
],
initialValue: 'browser',
}),
@@ -103,13 +106,12 @@ flags.channel = buildFlags.channel;
flags.coverage = buildFlags.coverage;
flags.entry = undefined;
-const cwd =
- flags.distribution === 'browser'
- ? join(projectRoot, 'packages', 'frontend', 'web')
- : join(projectRoot, 'packages', 'frontend', 'electron');
+const cwd = getCwdFromDistribution(flags.distribution);
+
+process.env.DISTRIBUTION = flags.distribution;
if (flags.distribution === 'desktop') {
- flags.entry = join(cwd, 'renderer', 'index.tsx');
+ flags.entry = join(cwd, 'index.tsx');
}
if (buildFlags.debugBlockSuite) {
diff --git a/tools/cli/src/config/cwd.cjs b/tools/cli/src/config/cwd.cjs
new file mode 100644
index 0000000000..dbffed6657
--- /dev/null
+++ b/tools/cli/src/config/cwd.cjs
@@ -0,0 +1,30 @@
+// @ts-check
+
+const { join } = require('node:path');
+
+const projectRoot = join(__dirname, '../../../..');
+
+module.exports.projectRoot = projectRoot;
+
+/**
+ *
+ * @param {string | undefined} distribution
+ * @returns string
+ */
+module.exports.getCwdFromDistribution = function getCwdFromDistribution(
+ distribution
+) {
+ switch (distribution) {
+ case 'browser':
+ case undefined:
+ case null:
+ return join(projectRoot, 'packages/frontend/web');
+ case 'desktop':
+ return join(projectRoot, 'packages/frontend/electron/renderer');
+ case 'admin':
+ return join(projectRoot, 'packages/frontend/admin');
+ default: {
+ throw new Error('DISTRIBUTION must be one of browser, desktop');
+ }
+ }
+};
diff --git a/tools/cli/src/config/index.ts b/tools/cli/src/config/index.ts
index cfb2f74b0e..453cbb571f 100644
--- a/tools/cli/src/config/index.ts
+++ b/tools/cli/src/config/index.ts
@@ -1,14 +1,8 @@
-import { fileURLToPath } from 'node:url';
-
export type BuildFlags = {
- distribution: 'browser' | 'desktop';
+ distribution: 'browser' | 'desktop' | 'admin';
mode: 'development' | 'production';
channel: 'stable' | 'beta' | 'canary' | 'internal';
coverage?: boolean;
localBlockSuite?: string;
entry?: string;
};
-
-export const projectRoot = fileURLToPath(
- new URL('../../../../', import.meta.url)
-);
diff --git a/tools/cli/src/util/i18n.ts b/tools/cli/src/util/i18n.ts
index 0c35f45038..a0af11044c 100644
--- a/tools/cli/src/util/i18n.ts
+++ b/tools/cli/src/util/i18n.ts
@@ -2,7 +2,7 @@ import { resolve } from 'node:path';
import { runCli } from '@magic-works/i18n-codegen';
-import { projectRoot } from '../config/index.js';
+import { projectRoot } from '../config/cwd.cjs';
const configPath = resolve(projectRoot, '.i18n-codegen.json');
diff --git a/tools/cli/src/util/infra.ts b/tools/cli/src/util/infra.ts
index 87992af8d0..4e88c9ae8d 100644
--- a/tools/cli/src/util/infra.ts
+++ b/tools/cli/src/util/infra.ts
@@ -3,7 +3,7 @@ import { resolve } from 'node:path';
import { build } from 'vite';
-import { projectRoot } from '../config/index.js';
+import { projectRoot } from '../config/cwd.cjs';
const infraFilePath = resolve(
projectRoot,
diff --git a/tools/cli/src/webpack/config.ts b/tools/cli/src/webpack/config.ts
index 81c7df5a96..33db290f28 100644
--- a/tools/cli/src/webpack/config.ts
+++ b/tools/cli/src/webpack/config.ts
@@ -1,5 +1,5 @@
import { createRequire } from 'node:module';
-import { join, resolve } from 'node:path';
+import { join } from 'node:path';
import { fileURLToPath } from 'node:url';
import type { RuntimeConfig } from '@affine/env/global';
@@ -14,8 +14,8 @@ import TerserPlugin from 'terser-webpack-plugin';
import webpack from 'webpack';
import type { Configuration as DevServerConfiguration } from 'webpack-dev-server';
+import { projectRoot } from '../config/cwd.cjs';
import type { BuildFlags } from '../config/index.js';
-import { projectRoot } from '../config/index.js';
import { productionCacheGroups } from './cache-group.js';
import { WebpackS3Plugin } from './s3-plugin.js';
@@ -312,11 +312,7 @@ export const createConfiguration: (
loader: 'postcss-loader',
options: {
postcssOptions: {
- config: resolve(
- rootPath,
- 'webpack',
- 'postcss.config.cjs'
- ),
+ config: join(rootPath, 'webpack', 'postcss.config.cjs'),
},
},
},
@@ -355,15 +351,23 @@ export const createConfiguration: (
),
runtimeConfig: JSON.stringify(runtimeConfig),
}),
- new CopyPlugin({
- patterns: [
- {
- // copy the shared public assets into dist
- from: join(workspaceRoot, 'packages', 'frontend', 'core', 'public'),
- to: join(cwd, 'dist'),
- },
- ],
- }),
+ buildFlags.distribution === 'admin'
+ ? null
+ : new CopyPlugin({
+ patterns: [
+ {
+ // copy the shared public assets into dist
+ from: join(
+ workspaceRoot,
+ 'packages',
+ 'frontend',
+ 'core',
+ 'public'
+ ),
+ to: join(cwd, 'dist'),
+ },
+ ],
+ }),
buildFlags.mode === 'production' && process.env.R2_SECRET_ACCESS_KEY
? new WebpackS3Plugin()
: null,
diff --git a/tools/cli/src/webpack/postcss.config.cjs b/tools/cli/src/webpack/postcss.config.cjs
index f27102db66..9bc817f28a 100644
--- a/tools/cli/src/webpack/postcss.config.cjs
+++ b/tools/cli/src/webpack/postcss.config.cjs
@@ -1,4 +1,27 @@
+const { join } = require('node:path');
+
const cssnano = require('cssnano');
+const tailwindcss = require('tailwindcss');
+const autoprefixer = require('autoprefixer');
+
+const { getCwdFromDistribution } = require('../config/cwd.cjs');
+
+const projectCwd = getCwdFromDistribution(process.env.DISTRIBUTION);
+
+const twConfig = (function () {
+ try {
+ const config = require(`${projectCwd}/tailwind.config.js`);
+ const { content } = config;
+ if (Array.isArray(content)) {
+ config.content = content.map(c =>
+ c.startsWith(projectCwd) ? c : join(projectCwd, c)
+ );
+ }
+ return config;
+ } catch {
+ return null;
+ }
+})();
module.exports = function (context) {
const plugins = [
@@ -12,6 +35,10 @@ module.exports = function (context) {
}),
];
+ if (twConfig) {
+ plugins.push(tailwindcss(twConfig), autoprefixer());
+ }
+
return {
from: context.from,
plugins,
diff --git a/tools/cli/src/webpack/webpack.config.ts b/tools/cli/src/webpack/webpack.config.ts
index 3a60773b2a..889c545676 100644
--- a/tools/cli/src/webpack/webpack.config.ts
+++ b/tools/cli/src/webpack/webpack.config.ts
@@ -35,7 +35,7 @@ export function createWebpackConfig(cwd: string, flags: BuildFlags) {
const config = createConfiguration(cwd, flags, runtimeConfig);
return merge(config, {
entry: {
- app: flags.entry ?? resolve(cwd, 'src/index.tsx'),
+ [flags.distribution]: flags.entry ?? resolve(cwd, 'src/index.tsx'),
},
plugins: [
new HTMLPlugin({
@@ -43,7 +43,7 @@ export function createWebpackConfig(cwd: string, flags: BuildFlags) {
inject: 'body',
scriptLoading: 'module',
minify: false,
- chunks: ['app'],
+ chunks: 'all',
filename: 'index.html',
templateParameters: {
GIT_SHORT_SHA: gitShortHash(),
diff --git a/tools/cli/tsconfig.json b/tools/cli/tsconfig.json
index 19e739822b..796d7ab24f 100644
--- a/tools/cli/tsconfig.json
+++ b/tools/cli/tsconfig.json
@@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"composite": true,
+ "allowJs": true,
"module": "ESNext",
"moduleResolution": "Node",
"outDir": "lib"
diff --git a/tools/commitlint/.commitlintrc.json b/tools/commitlint/.commitlintrc.json
index 20caaa161f..eb20052669 100644
--- a/tools/commitlint/.commitlintrc.json
+++ b/tools/commitlint/.commitlintrc.json
@@ -5,6 +5,7 @@
2,
"always",
[
+ "admin",
"electron",
"server",
"core",
diff --git a/tsconfig.json b/tsconfig.json
index 4476b194ef..1ce5978fdb 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -49,6 +49,10 @@
"paths": {
"@affine/core/*": ["./packages/frontend/core/src/*"],
"@affine/core": ["./packages/frontend/core/src/index.ts"],
+ "@affine/admin/*": ["./packages/frontend/admin/src/*"],
+ "@affine/admin/components/ui/*": [
+ "./packages/frontend/admin/src/components/ui/*"
+ ],
"@affine/cli/*": ["./tools/cli/src/*"],
"@affine/server/*": ["./packages/backend/server/src/*"],
"@affine/component": ["./packages/frontend/component/src/index"],
@@ -83,6 +87,9 @@
"path": "./packages/backend/server/tests"
},
// Frontend
+ {
+ "path": "./packages/frontend/admin"
+ },
{
"path": "./packages/frontend/component"
},
diff --git a/yarn.lock b/yarn.lock
index 7e3cb09b4b..29cdfe2f40 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -149,6 +149,66 @@ __metadata:
languageName: unknown
linkType: soft
+"@affine/admin@workspace:packages/frontend/admin":
+ version: 0.0.0-use.local
+ resolution: "@affine/admin@workspace:packages/frontend/admin"
+ dependencies:
+ "@affine/core": "workspace:*"
+ "@affine/graphql": "workspace:*"
+ "@hookform/resolvers": "npm:^3.6.0"
+ "@radix-ui/react-accordion": "npm:^1.1.2"
+ "@radix-ui/react-alert-dialog": "npm:^1.0.5"
+ "@radix-ui/react-aspect-ratio": "npm:^1.0.3"
+ "@radix-ui/react-avatar": "npm:^1.0.4"
+ "@radix-ui/react-checkbox": "npm:^1.0.4"
+ "@radix-ui/react-collapsible": "npm:^1.0.3"
+ "@radix-ui/react-context-menu": "npm:^2.1.5"
+ "@radix-ui/react-dialog": "npm:^1.0.5"
+ "@radix-ui/react-dropdown-menu": "npm:^2.0.6"
+ "@radix-ui/react-hover-card": "npm:^1.0.7"
+ "@radix-ui/react-label": "npm:^2.0.2"
+ "@radix-ui/react-menubar": "npm:^1.0.4"
+ "@radix-ui/react-navigation-menu": "npm:^1.1.4"
+ "@radix-ui/react-popover": "npm:^1.0.7"
+ "@radix-ui/react-progress": "npm:^1.0.3"
+ "@radix-ui/react-radio-group": "npm:^1.1.3"
+ "@radix-ui/react-scroll-area": "npm:^1.0.5"
+ "@radix-ui/react-select": "npm:^2.0.0"
+ "@radix-ui/react-separator": "npm:^1.0.3"
+ "@radix-ui/react-slider": "npm:^1.1.2"
+ "@radix-ui/react-slot": "npm:^1.0.2"
+ "@radix-ui/react-switch": "npm:^1.0.3"
+ "@radix-ui/react-tabs": "npm:^1.0.4"
+ "@radix-ui/react-toast": "npm:^1.1.5"
+ "@radix-ui/react-toggle": "npm:^1.0.3"
+ "@radix-ui/react-toggle-group": "npm:^1.0.4"
+ "@radix-ui/react-tooltip": "npm:^1.0.7"
+ "@sentry/react": "npm:^8.9.0"
+ class-variance-authority: "npm:^0.7.0"
+ clsx: "npm:^2.1.1"
+ cmdk: "npm:^1.0.0"
+ cross-env: "npm:^7.0.3"
+ date-fns: "npm:^3.6.0"
+ embla-carousel-react: "npm:^8.1.4"
+ input-otp: "npm:^1.2.4"
+ lucide-react: "npm:^0.394.0"
+ next-themes: "npm:^0.3.0"
+ react: "npm:^18.3.1"
+ react-day-picker: "npm:^8.10.1"
+ react-dom: "npm:^18.3.1"
+ react-hook-form: "npm:^7.51.5"
+ react-resizable-panels: "npm:^2.0.19"
+ react-router-dom: "npm:^6.23.1"
+ shadcn-ui: "npm:^0.8.0"
+ sonner: "npm:^1.5.0"
+ tailwind-merge: "npm:^2.3.0"
+ tailwindcss: "npm:^3.4.4"
+ tailwindcss-animate: "npm:^1.0.7"
+ vaul: "npm:^0.9.1"
+ zod: "npm:^3.23.8"
+ languageName: unknown
+ linkType: soft
+
"@affine/bump-blocksuite@workspace:tools/bump-blocksuite":
version: 0.0.0-use.local
resolution: "@affine/bump-blocksuite@workspace:tools/bump-blocksuite"
@@ -176,6 +236,7 @@ __metadata:
"@sentry/webpack-plugin": "npm:^2.16.1"
"@types/webpack-env": "npm:^1.18.4"
"@vanilla-extract/webpack-plugin": "npm:^2.3.7"
+ autoprefixer: "npm:^10.4.19"
copy-webpack-plugin: "npm:^12.0.2"
css-loader: "npm:^7.1.1"
cssnano: "npm:^7.0.0"
@@ -184,11 +245,13 @@ __metadata:
lodash-es: "npm:^4.17.21"
mime-types: "npm:^2.1.35"
mini-css-extract-plugin: "npm:^2.8.1"
+ postcss: "npm:^8.4.38"
postcss-loader: "npm:^8.1.1"
raw-loader: "npm:^4.0.2"
source-map-loader: "npm:^5.0.0"
style-loader: "npm:^4.0.0"
swc-loader: "npm:^0.2.6"
+ tailwindcss: "npm:^3.4.4"
terser-webpack-plugin: "npm:^5.3.10"
thread-loader: "npm:^4.0.2"
ts-node: "npm:^10.9.2"
@@ -794,6 +857,13 @@ __metadata:
languageName: unknown
linkType: soft
+"@alloc/quick-lru@npm:^5.2.0":
+ version: 5.2.0
+ resolution: "@alloc/quick-lru@npm:5.2.0"
+ checksum: 10/bdc35758b552bcf045733ac047fb7f9a07c4678b944c641adfbd41f798b4b91fffd0fdc0df2578d9b0afc7b4d636aa6e110ead5d6281a2adc1ab90efd7f057f8
+ languageName: node
+ linkType: hard
+
"@ampproject/remapping@npm:^2.2.0":
version: 2.3.0
resolution: "@ampproject/remapping@npm:2.3.0"
@@ -804,6 +874,21 @@ __metadata:
languageName: node
linkType: hard
+"@antfu/ni@npm:^0.21.4":
+ version: 0.21.12
+ resolution: "@antfu/ni@npm:0.21.12"
+ bin:
+ na: bin/na.mjs
+ nci: bin/nci.mjs
+ ni: bin/ni.mjs
+ nlx: bin/nlx.mjs
+ nr: bin/nr.mjs
+ nu: bin/nu.mjs
+ nun: bin/nun.mjs
+ checksum: 10/4d6cd78b14bb0884e5898e519ed914b1bf42cb8ddcd65d80ba415a3d09417482ed97ad1a068520865ab689edf552a5b610b0ba0543e2b870ecebc0047df7244b
+ languageName: node
+ linkType: hard
+
"@apollo/cache-control-types@npm:^1.0.3":
version: 1.0.3
resolution: "@apollo/cache-control-types@npm:1.0.3"
@@ -2015,7 +2100,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.14.0, @babel/core@npm:^7.18.5, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.12, @babel/core@npm:^7.22.5, @babel/core@npm:^7.22.9, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9, @babel/core@npm:^7.7.5":
+"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.14.0, @babel/core@npm:^7.18.5, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.12, @babel/core@npm:^7.22.1, @babel/core@npm:^7.22.5, @babel/core@npm:^7.22.9, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9, @babel/core@npm:^7.7.5":
version: 7.24.7
resolution: "@babel/core@npm:7.24.7"
dependencies:
@@ -2318,7 +2403,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.10.3, @babel/parser@npm:^7.14.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.8, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7":
+"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.10.3, @babel/parser@npm:^7.14.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.8, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.6, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7":
version: 7.24.7
resolution: "@babel/parser@npm:7.24.7"
bin:
@@ -3286,7 +3371,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/plugin-transform-typescript@npm:^7.24.7":
+"@babel/plugin-transform-typescript@npm:^7.22.5, @babel/plugin-transform-typescript@npm:^7.24.7":
version: 7.24.7
resolution: "@babel/plugin-transform-typescript@npm:7.24.7"
dependencies:
@@ -3501,7 +3586,7 @@ __metadata:
languageName: node
linkType: hard
-"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.16.7, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2":
+"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.16.7, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.24.1, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2":
version: 7.24.7
resolution: "@babel/runtime@npm:7.24.7"
dependencies:
@@ -6525,6 +6610,15 @@ __metadata:
languageName: node
linkType: hard
+"@hookform/resolvers@npm:^3.6.0":
+ version: 3.6.0
+ resolution: "@hookform/resolvers@npm:3.6.0"
+ peerDependencies:
+ react-hook-form: ^7.0.0
+ checksum: 10/6dd1b7ad21ed2b171470740884e0b83982c79a0d4ceddabe60b616e53eeed2b5569cdba5e91ad844e379aeda5ffa835b0c2d2525d702fcd8b263c2194895f9b7
+ languageName: node
+ linkType: hard
+
"@humanwhocodes/config-array@npm:^0.11.14":
version: 0.11.14
resolution: "@humanwhocodes/config-array@npm:0.11.14"
@@ -7097,7 +7191,7 @@ __metadata:
languageName: node
linkType: hard
-"@jridgewell/gen-mapping@npm:^0.3.5":
+"@jridgewell/gen-mapping@npm:^0.3.2, @jridgewell/gen-mapping@npm:^0.3.5":
version: 0.3.5
resolution: "@jridgewell/gen-mapping@npm:0.3.5"
dependencies:
@@ -10516,6 +10610,59 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-accordion@npm:^1.1.2":
+ version: 1.1.2
+ resolution: "@radix-ui/react-accordion@npm:1.1.2"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-collapsible": "npm:1.0.3"
+ "@radix-ui/react-collection": "npm:1.0.3"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-direction": "npm:1.0.1"
+ "@radix-ui/react-id": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/3c2b8fc686b3c6bc6f81e567c1d3933b8ffb35c060eeee113237ee69121b5e4d7c48bb354dbd2626bd101c1f6a1b6612e8cde2de8f72519732fb6c1a1d4cac28
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-alert-dialog@npm:^1.0.5":
+ version: 1.0.5
+ resolution: "@radix-ui/react-alert-dialog@npm:1.0.5"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-dialog": "npm:1.0.5"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-slot": "npm:1.0.2"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/966eeef94056caa4105278686018bc8ec5ec10584191d9e878944b1785ae88a355cbff0b754af4c3878bd97af8d954583b7a2e4819b928ccf6839cd2962e8a09
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-arrow@npm:1.0.3":
version: 1.0.3
resolution: "@radix-ui/react-arrow@npm:1.0.3"
@@ -10536,6 +10683,26 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-aspect-ratio@npm:^1.0.3":
+ version: 1.0.3
+ resolution: "@radix-ui/react-aspect-ratio@npm:1.0.3"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/2c3302be0f14f4737b0100f2c1bd5a5b7fabb90cd4f9ff567a1151824d80710d9354ef10b1c521d608c478720babf4d243cdeada44205b45e2f2631f475eba98
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-avatar@npm:^1.0.4":
version: 1.0.4
resolution: "@radix-ui/react-avatar@npm:1.0.4"
@@ -10559,7 +10726,34 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-collapsible@npm:^1.0.3":
+"@radix-ui/react-checkbox@npm:^1.0.4":
+ version: 1.0.4
+ resolution: "@radix-ui/react-checkbox@npm:1.0.4"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-presence": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ "@radix-ui/react-use-previous": "npm:1.0.1"
+ "@radix-ui/react-use-size": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/e3f2f169c017349e3e7844911f116641e44a50d9cc3ba9e270a6bc9d2118641ac515c67fe2a611dad98eefb29ae1e2e6a47a81abd44570faaabe7056ec3f02b1
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-collapsible@npm:1.0.3, @radix-ui/react-collapsible@npm:^1.0.3":
version: 1.0.3
resolution: "@radix-ui/react-collapsible@npm:1.0.3"
dependencies:
@@ -10624,6 +10818,31 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-context-menu@npm:^2.1.5":
+ version: 2.1.5
+ resolution: "@radix-ui/react-context-menu@npm:2.1.5"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-menu": "npm:2.0.6"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.0.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/45400126a39aeae340fbdf768d2bdcb545ff8676a8c619e5910f286ec1fac124b6a36510dc49224204d18e4ff20e011bc7f1827d25472b9cdfc8cc067513fd36
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-context@npm:1.0.1":
version: 1.0.1
resolution: "@radix-ui/react-context@npm:1.0.1"
@@ -10820,6 +11039,34 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-hover-card@npm:^1.0.7":
+ version: 1.0.7
+ resolution: "@radix-ui/react-hover-card@npm:1.0.7"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-dismissable-layer": "npm:1.0.5"
+ "@radix-ui/react-popper": "npm:1.1.3"
+ "@radix-ui/react-portal": "npm:1.0.4"
+ "@radix-ui/react-presence": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/f8184a153c6322f5fa32ee9be771eaff6a4626da48a4194aceda7fd0c666d41a2210922063cc984ffd715351c0ec3d0d522de9253f7c1185cf0a4e5ef30ae33a
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-id@npm:1.0.1":
version: 1.0.1
resolution: "@radix-ui/react-id@npm:1.0.1"
@@ -10836,6 +11083,26 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-label@npm:^2.0.2":
+ version: 2.0.2
+ resolution: "@radix-ui/react-label@npm:2.0.2"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/fe3bd8902bc523fb5125fa96167a13b8a60d007413787eae9573e4b00b0edff0487c4c0620ea5dc37e6da13833ebc4f8d7e00b6c846f2a5686e7f173672b8dde
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-menu@npm:2.0.6":
version: 2.0.6
resolution: "@radix-ui/react-menu@npm:2.0.6"
@@ -10873,6 +11140,68 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-menubar@npm:^1.0.4":
+ version: 1.0.4
+ resolution: "@radix-ui/react-menubar@npm:1.0.4"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-collection": "npm:1.0.3"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-direction": "npm:1.0.1"
+ "@radix-ui/react-id": "npm:1.0.1"
+ "@radix-ui/react-menu": "npm:2.0.6"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-roving-focus": "npm:1.0.4"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/be5112ce6c3b7c939111bb1b91e514c2abdaec3d18915edfa53df926971b342d35877d4337763a1aaa8c8988c9023d01da74519745dc670c387cc7ff4625e2c9
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-navigation-menu@npm:^1.1.4":
+ version: 1.1.4
+ resolution: "@radix-ui/react-navigation-menu@npm:1.1.4"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-collection": "npm:1.0.3"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-direction": "npm:1.0.1"
+ "@radix-ui/react-dismissable-layer": "npm:1.0.5"
+ "@radix-ui/react-id": "npm:1.0.1"
+ "@radix-ui/react-presence": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-use-callback-ref": "npm:1.0.1"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ "@radix-ui/react-use-layout-effect": "npm:1.0.1"
+ "@radix-ui/react-use-previous": "npm:1.0.1"
+ "@radix-ui/react-visually-hidden": "npm:1.0.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/ae502c3757a1a0417209a76def7fd43088d3414658b8acc2010a1c68c3f737fdd20f601eed384ddc0fdb55404f6299ae1dd23e1ae28b7e902595d98b97699825
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-popover@npm:^1.0.7":
version: 1.0.7
resolution: "@radix-ui/react-popover@npm:1.0.7"
@@ -11046,6 +11375,27 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-progress@npm:^1.0.3":
+ version: 1.0.3
+ resolution: "@radix-ui/react-progress@npm:1.0.3"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/d82c800fd291290bd0d2c4ff55180d39b9c513cd990b28afc7d828510a972a4b71e898fa9e0630c0be5e48577136605935665c92cc5e47abf66b56adc5765c5f
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-radio-group@npm:^1.1.3":
version: 1.1.3
resolution: "@radix-ui/react-radio-group@npm:1.1.3"
@@ -11211,7 +11561,7 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-separator@npm:1.0.3":
+"@radix-ui/react-separator@npm:1.0.3, @radix-ui/react-separator@npm:^1.0.3":
version: 1.0.3
resolution: "@radix-ui/react-separator@npm:1.0.3"
dependencies:
@@ -11231,6 +11581,36 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-slider@npm:^1.1.2":
+ version: 1.1.2
+ resolution: "@radix-ui/react-slider@npm:1.1.2"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/number": "npm:1.0.1"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-collection": "npm:1.0.3"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-direction": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ "@radix-ui/react-use-layout-effect": "npm:1.0.1"
+ "@radix-ui/react-use-previous": "npm:1.0.1"
+ "@radix-ui/react-use-size": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/abbbeeccd6542a6421caa1d0bdb236afd4ecaa4b78f17a38273e85f7b2b1a9a8499292df469dc41f9163578cfde73958f0adb8d4c3fcd18802df9d669651fd9e
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-slot@npm:1.0.2, @radix-ui/react-slot@npm:^1.0.2":
version: 1.0.2
resolution: "@radix-ui/react-slot@npm:1.0.2"
@@ -11247,6 +11627,59 @@ __metadata:
languageName: node
linkType: hard
+"@radix-ui/react-switch@npm:^1.0.3":
+ version: 1.0.3
+ resolution: "@radix-ui/react-switch@npm:1.0.3"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-compose-refs": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ "@radix-ui/react-use-previous": "npm:1.0.1"
+ "@radix-ui/react-use-size": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/b5ee2c0ec92feaf8100ddbb2bb1a4a1dc42c2350e31aedf3d595b21c8a8686d338bde940985007635cec43134f9a6712e301d85fa6df352cb716e6745be5d37a
+ languageName: node
+ linkType: hard
+
+"@radix-ui/react-tabs@npm:^1.0.4":
+ version: 1.0.4
+ resolution: "@radix-ui/react-tabs@npm:1.0.4"
+ dependencies:
+ "@babel/runtime": "npm:^7.13.10"
+ "@radix-ui/primitive": "npm:1.0.1"
+ "@radix-ui/react-context": "npm:1.0.1"
+ "@radix-ui/react-direction": "npm:1.0.1"
+ "@radix-ui/react-id": "npm:1.0.1"
+ "@radix-ui/react-presence": "npm:1.0.1"
+ "@radix-ui/react-primitive": "npm:1.0.3"
+ "@radix-ui/react-roving-focus": "npm:1.0.4"
+ "@radix-ui/react-use-controllable-state": "npm:1.0.1"
+ peerDependencies:
+ "@types/react": "*"
+ "@types/react-dom": "*"
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ "@types/react":
+ optional: true
+ "@types/react-dom":
+ optional: true
+ checksum: 10/9d2d6e3d922e95274b5b205efbac2749d4e3ef9106fe270213dd178dec7411908c9a639f204e3eeb2c5e982a512fdda98a55a8e1a789cfc844ebd51425af0539
+ languageName: node
+ linkType: hard
+
"@radix-ui/react-toast@npm:^1.1.5":
version: 1.1.5
resolution: "@radix-ui/react-toast@npm:1.1.5"
@@ -11278,7 +11711,7 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-toggle-group@npm:1.0.4":
+"@radix-ui/react-toggle-group@npm:1.0.4, @radix-ui/react-toggle-group@npm:^1.0.4":
version: 1.0.4
resolution: "@radix-ui/react-toggle-group@npm:1.0.4"
dependencies:
@@ -11304,7 +11737,7 @@ __metadata:
languageName: node
linkType: hard
-"@radix-ui/react-toggle@npm:1.0.3":
+"@radix-ui/react-toggle@npm:1.0.3, @radix-ui/react-toggle@npm:^1.0.3":
version: 1.0.3
resolution: "@radix-ui/react-toggle@npm:1.0.3"
dependencies:
@@ -11837,49 +12270,49 @@ __metadata:
languageName: node
linkType: hard
-"@sentry-internal/browser-utils@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry-internal/browser-utils@npm:8.9.2"
+"@sentry-internal/browser-utils@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry-internal/browser-utils@npm:8.9.0"
dependencies:
- "@sentry/core": "npm:8.9.2"
- "@sentry/types": "npm:8.9.2"
- "@sentry/utils": "npm:8.9.2"
- checksum: 10/7cbe73d205d65315aa3037700baad2ec65974aacd68be901ea9cb644be1ccfcaa521912f7b063bfc7fca13e6035f9c21915124c2b92114f6c19f7c954ba028c2
+ "@sentry/core": "npm:8.9.0"
+ "@sentry/types": "npm:8.9.0"
+ "@sentry/utils": "npm:8.9.0"
+ checksum: 10/567617295da7522a05849d3df670535c58613b0f7fa0a7473481bfb9e9aa5e9eb468156ad7064eb86b91d997d0b07f2ab3915288f4d999bbbcce30992a4b7e30
languageName: node
linkType: hard
-"@sentry-internal/feedback@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry-internal/feedback@npm:8.9.2"
+"@sentry-internal/feedback@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry-internal/feedback@npm:8.9.0"
dependencies:
- "@sentry/core": "npm:8.9.2"
- "@sentry/types": "npm:8.9.2"
- "@sentry/utils": "npm:8.9.2"
- checksum: 10/5bdac79f2553142715f2b15e110b5279dafde7db17824fcf70af35006f7e81726a5f476f830de63bfde88637bebc68d8fd73a348c774c2ba9e5496cd41d9b854
+ "@sentry/core": "npm:8.9.0"
+ "@sentry/types": "npm:8.9.0"
+ "@sentry/utils": "npm:8.9.0"
+ checksum: 10/58b91122403ee34965ee164bf309413102a2057d6885ce5a304b5cb62bf6e2aa8333b469c96a12a2d3953af5a2f0975275a9138fb93d08e807267fcf547ff316
languageName: node
linkType: hard
-"@sentry-internal/replay-canvas@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry-internal/replay-canvas@npm:8.9.2"
+"@sentry-internal/replay-canvas@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry-internal/replay-canvas@npm:8.9.0"
dependencies:
- "@sentry-internal/replay": "npm:8.9.2"
- "@sentry/core": "npm:8.9.2"
- "@sentry/types": "npm:8.9.2"
- "@sentry/utils": "npm:8.9.2"
- checksum: 10/204e81844ad2120fdc89c1f50191928a56b44349408c02c6334492a96f70f5c8494e72a23eac0036c3b2dd6bae0d2d34c1cd224c24a9401189201b843f6c4984
+ "@sentry-internal/replay": "npm:8.9.0"
+ "@sentry/core": "npm:8.9.0"
+ "@sentry/types": "npm:8.9.0"
+ "@sentry/utils": "npm:8.9.0"
+ checksum: 10/c0ae51645d2d0f9a6866fce483c944ef0bc13b1860d432650df40927061b477feb263fe6c8c92eee00c492872b08780e44d07f238ccdbebf89effb06af73c1ea
languageName: node
linkType: hard
-"@sentry-internal/replay@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry-internal/replay@npm:8.9.2"
+"@sentry-internal/replay@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry-internal/replay@npm:8.9.0"
dependencies:
- "@sentry-internal/browser-utils": "npm:8.9.2"
- "@sentry/core": "npm:8.9.2"
- "@sentry/types": "npm:8.9.2"
- "@sentry/utils": "npm:8.9.2"
- checksum: 10/03cb1d2834c8da92724311266d0ebc03428242ab547f62a98533ed55772e07f5cc5ab0eed527dcaa63937d355efb9c60ca037955ec6884f0f04e7773cb898937
+ "@sentry-internal/browser-utils": "npm:8.9.0"
+ "@sentry/core": "npm:8.9.0"
+ "@sentry/types": "npm:8.9.0"
+ "@sentry/utils": "npm:8.9.0"
+ checksum: 10/64ffcdcdb8dc5087a44bab105b756b645c3123f1d9e999350b3a0946e4deb3e19c266d6cd0f9df6ff747ec3944ee951694054a8018f6f507d6f918f0315582e4
languageName: node
linkType: hard
@@ -11890,18 +12323,18 @@ __metadata:
languageName: node
linkType: hard
-"@sentry/browser@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry/browser@npm:8.9.2"
+"@sentry/browser@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry/browser@npm:8.9.0"
dependencies:
- "@sentry-internal/browser-utils": "npm:8.9.2"
- "@sentry-internal/feedback": "npm:8.9.2"
- "@sentry-internal/replay": "npm:8.9.2"
- "@sentry-internal/replay-canvas": "npm:8.9.2"
- "@sentry/core": "npm:8.9.2"
- "@sentry/types": "npm:8.9.2"
- "@sentry/utils": "npm:8.9.2"
- checksum: 10/81ea21515e68ef6004c7bd166bb49b51450b0edf67e91d9aa3cd5191b00b573b2ba821ee1d79908679ab343d415f89ba81379659f3aa60aa886245978554db47
+ "@sentry-internal/browser-utils": "npm:8.9.0"
+ "@sentry-internal/feedback": "npm:8.9.0"
+ "@sentry-internal/replay": "npm:8.9.0"
+ "@sentry-internal/replay-canvas": "npm:8.9.0"
+ "@sentry/core": "npm:8.9.0"
+ "@sentry/types": "npm:8.9.0"
+ "@sentry/utils": "npm:8.9.0"
+ checksum: 10/cd738ebc9fc736ab6d0caa2663b218ddc147c9b3e8c175794772b550947294eb8c61c57e21d1bcc877f2ae2da772dfa0ebd0138c420d3f22ccc030ff44dec1c3
languageName: node
linkType: hard
@@ -12017,13 +12450,13 @@ __metadata:
languageName: node
linkType: hard
-"@sentry/core@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry/core@npm:8.9.2"
+"@sentry/core@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry/core@npm:8.9.0"
dependencies:
- "@sentry/types": "npm:8.9.2"
- "@sentry/utils": "npm:8.9.2"
- checksum: 10/f11532b9f0cceceb40f1934a23360c98d3dd7ae8a05f14e2ed5f5a247932716f5f7367aa1f6cba7dc2736b063ceaefe27d4ebe55af6e6ca593a9b39d75d1ca4e
+ "@sentry/types": "npm:8.9.0"
+ "@sentry/utils": "npm:8.9.0"
+ checksum: 10/9480da4fe66f5e69d72d5de1afd689cdf1352f52d4703e1904ec5236a3c420e2ef0f21c9eb2577161036a0c80040d25b855e68cf6d69140cd046075f5916e485
languageName: node
linkType: hard
@@ -12050,18 +12483,18 @@ __metadata:
languageName: node
linkType: hard
-"@sentry/react@npm:^8.0.0":
- version: 8.9.2
- resolution: "@sentry/react@npm:8.9.2"
+"@sentry/react@npm:^8.0.0, @sentry/react@npm:^8.9.0":
+ version: 8.9.0
+ resolution: "@sentry/react@npm:8.9.0"
dependencies:
- "@sentry/browser": "npm:8.9.2"
- "@sentry/core": "npm:8.9.2"
- "@sentry/types": "npm:8.9.2"
- "@sentry/utils": "npm:8.9.2"
+ "@sentry/browser": "npm:8.9.0"
+ "@sentry/core": "npm:8.9.0"
+ "@sentry/types": "npm:8.9.0"
+ "@sentry/utils": "npm:8.9.0"
hoist-non-react-statics: "npm:^3.3.2"
peerDependencies:
react: ^16.14.0 || 17.x || 18.x || 19.x
- checksum: 10/ec93c6205f8a0545a0704b54490267f53b11bb9876ec86255ffa096defbdb81fb11e0c891b60b09ecd3b1f3e9f4d3d511c51968cd5f5f2acf0b2bef33c0e672b
+ checksum: 10/db7b773a5c60568996c6fa571cf6db348e62a3008670a1728b160792c04c3d3b30d755db491edf3879e7480568a711aff7eb2fbc079374ece6ae8daa134a11c8
languageName: node
linkType: hard
@@ -12072,10 +12505,10 @@ __metadata:
languageName: node
linkType: hard
-"@sentry/types@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry/types@npm:8.9.2"
- checksum: 10/a38f4dd21330a3d4c848f94ba678ce24ce5489236286247bae351db1d97d49733cd4888b59e1b193077fe38a1bd8e04e72067e749897bfd15d657cc551333657
+"@sentry/types@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry/types@npm:8.9.0"
+ checksum: 10/004a509eb6a9789a3577750129f81c5ca1a1dde804dccc3c5c4b8b149d3d154ea202327165fda5ace4abecb2ce051cdd90e8a3629db92e8b4ac0f1181864d849
languageName: node
linkType: hard
@@ -12088,12 +12521,12 @@ __metadata:
languageName: node
linkType: hard
-"@sentry/utils@npm:8.9.2":
- version: 8.9.2
- resolution: "@sentry/utils@npm:8.9.2"
+"@sentry/utils@npm:8.9.0":
+ version: 8.9.0
+ resolution: "@sentry/utils@npm:8.9.0"
dependencies:
- "@sentry/types": "npm:8.9.2"
- checksum: 10/4933dbbb837ce61006ea867fea061d610c72330d04b33fd1871a9a327e8d11d8d150db34054d5fd7c316270167c17179f5bfe7eddded49cb5010b14cdffb5e75
+ "@sentry/types": "npm:8.9.0"
+ checksum: 10/6765e153141007fb580c6ade20a9f7dff4b0ce47797bc0e991ec4eb0b7ec6430d22f1470ee463fc4ffa2ef4247b375b6ad06ad8529b745f30cd1bc26ee9b9f14
languageName: node
linkType: hard
@@ -14325,6 +14758,18 @@ __metadata:
languageName: node
linkType: hard
+"@ts-morph/common@npm:~0.19.0":
+ version: 0.19.0
+ resolution: "@ts-morph/common@npm:0.19.0"
+ dependencies:
+ fast-glob: "npm:^3.2.12"
+ minimatch: "npm:^7.4.3"
+ mkdirp: "npm:^2.1.6"
+ path-browserify: "npm:^1.0.1"
+ checksum: 10/6a7111c14b2793e2d07785a0d5431472cd5761e52edf0c297cd0e5400e8d75eb79f9b2e597ba1d7e687f1d2312e44d48fdd59d9e796cee9c9cd4528f2083dfab
+ languageName: node
+ linkType: hard
+
"@tsconfig/node10@npm:^1.0.7":
version: 1.0.11
resolution: "@tsconfig/node10@npm:1.0.11"
@@ -16628,6 +17073,13 @@ __metadata:
languageName: node
linkType: hard
+"any-promise@npm:^1.0.0":
+ version: 1.3.0
+ resolution: "any-promise@npm:1.3.0"
+ checksum: 10/6737469ba353b5becf29e4dc3680736b9caa06d300bda6548812a8fee63ae7d336d756f88572fa6b5219aed36698d808fa55f62af3e7e6845c7a1dc77d240edb
+ languageName: node
+ linkType: hard
+
"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2":
version: 3.1.3
resolution: "anymatch@npm:3.1.3"
@@ -16768,7 +17220,7 @@ __metadata:
languageName: node
linkType: hard
-"arg@npm:5.0.2":
+"arg@npm:5.0.2, arg@npm:^5.0.2":
version: 5.0.2
resolution: "arg@npm:5.0.2"
checksum: 10/92fe7de222054a060fd2329e92e867410b3ea260328147ee3fb7855f78efae005f4087e698d4e688a856893c56bb09951588c40f2c901cf6996cd8cd7bcfef2c
@@ -17108,6 +17560,24 @@ __metadata:
languageName: node
linkType: hard
+"autoprefixer@npm:^10.4.19":
+ version: 10.4.19
+ resolution: "autoprefixer@npm:10.4.19"
+ dependencies:
+ browserslist: "npm:^4.23.0"
+ caniuse-lite: "npm:^1.0.30001599"
+ fraction.js: "npm:^4.3.7"
+ normalize-range: "npm:^0.1.2"
+ picocolors: "npm:^1.0.0"
+ postcss-value-parser: "npm:^4.2.0"
+ peerDependencies:
+ postcss: ^8.1.0
+ bin:
+ autoprefixer: bin/autoprefixer
+ checksum: 10/98378eae37b8bf0f1515e4c91b4c9c1ce69ede311d4dea7e934f5afe147d23712c577f112c4019a4c40461c585d82d474d08044f8eb6cb8a063c3d5b7aca52d2
+ languageName: node
+ linkType: hard
+
"ava@npm:^6.1.2":
version: 6.1.3
resolution: "ava@npm:6.1.3"
@@ -17537,6 +18007,17 @@ __metadata:
languageName: node
linkType: hard
+"bl@npm:^5.0.0":
+ version: 5.1.0
+ resolution: "bl@npm:5.1.0"
+ dependencies:
+ buffer: "npm:^6.0.3"
+ inherits: "npm:^2.0.4"
+ readable-stream: "npm:^3.4.0"
+ checksum: 10/0340d3d70def4213cd9cbcd8592f7c5922d3668e7b231286c354613fac4a8411ad373cff26e06162da7423035bbd5caafce3e140a5f397be72fcd1e9d86f1179
+ languageName: node
+ linkType: hard
+
"blake3-wasm@npm:^2.1.5":
version: 2.1.5
resolution: "blake3-wasm@npm:2.1.5"
@@ -17775,6 +18256,16 @@ __metadata:
languageName: node
linkType: hard
+"buffer@npm:^6.0.3":
+ version: 6.0.3
+ resolution: "buffer@npm:6.0.3"
+ dependencies:
+ base64-js: "npm:^1.3.1"
+ ieee754: "npm:^1.2.1"
+ checksum: 10/b6bc68237ebf29bdacae48ce60e5e28fc53ae886301f2ad9496618efac49427ed79096750033e7eab1897a4f26ae374ace49106a5758f38fb70c78c9fda2c3b1
+ languageName: node
+ linkType: hard
+
"builder-util-runtime@npm:9.2.4":
version: 9.2.4
resolution: "builder-util-runtime@npm:9.2.4"
@@ -18015,6 +18506,13 @@ __metadata:
languageName: node
linkType: hard
+"camelcase-css@npm:^2.0.1":
+ version: 2.0.1
+ resolution: "camelcase-css@npm:2.0.1"
+ checksum: 10/1cec2b3b3dcb5026688a470b00299a8db7d904c4802845c353dbd12d9d248d3346949a814d83bfd988d4d2e5b9904c07efe76fecd195a1d4f05b543e7c0b56b1
+ languageName: node
+ linkType: hard
+
"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1":
version: 5.3.1
resolution: "camelcase@npm:5.3.1"
@@ -18048,7 +18546,7 @@ __metadata:
languageName: node
linkType: hard
-"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001629":
+"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001599, caniuse-lite@npm:^1.0.30001629":
version: 1.0.30001632
resolution: "caniuse-lite@npm:1.0.30001632"
checksum: 10/80b8b75007e525c30ec204adff4a16797a83ac9faeec33ed20ad14b55239c2721693f248389ee3bc9a76f8fd0182870872af7a9c80d48484a3eab7c5e8af173f
@@ -18130,6 +18628,13 @@ __metadata:
languageName: node
linkType: hard
+"chalk@npm:5.2.0":
+ version: 5.2.0
+ resolution: "chalk@npm:5.2.0"
+ checksum: 10/daadc187314c851cd94f1058dd870a2dd351dfaef8cf69048977fc56bce120f02f7aca77eb7ca88bf7a37ab6c15922e12b43f4ffa885f4fd2d9e15dd14c61a1b
+ languageName: node
+ linkType: hard
+
"chalk@npm:^2.4.2":
version: 2.4.2
resolution: "chalk@npm:2.4.2"
@@ -18161,7 +18666,7 @@ __metadata:
languageName: node
linkType: hard
-"chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0, chalk@npm:~5.3.0":
+"chalk@npm:^5.0.0, chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0, chalk@npm:~5.3.0":
version: 5.3.0
resolution: "chalk@npm:5.3.0"
checksum: 10/6373caaab21bd64c405bfc4bd9672b145647fc9482657b5ea1d549b3b2765054e9d3d928870cdf764fb4aad67555f5061538ff247b8310f110c5c888d92397ea
@@ -18385,6 +18890,15 @@ __metadata:
languageName: node
linkType: hard
+"class-variance-authority@npm:^0.7.0":
+ version: 0.7.0
+ resolution: "class-variance-authority@npm:0.7.0"
+ dependencies:
+ clsx: "npm:2.0.0"
+ checksum: 10/06646e82953e577fb8834100d763f1e5ecb808b8a1fba6244e94b20603865b134ff2296e30432449793baaeb02282cce617afba6981afe18b6846f1f8e9485ca
+ languageName: node
+ linkType: hard
+
"clean-css@npm:^5.2.2":
version: 5.3.3
resolution: "clean-css@npm:5.3.3"
@@ -18442,7 +18956,7 @@ __metadata:
languageName: node
linkType: hard
-"cli-spinners@npm:^2.5.0, cli-spinners@npm:^2.9.2":
+"cli-spinners@npm:^2.5.0, cli-spinners@npm:^2.6.1, cli-spinners@npm:^2.9.2":
version: 2.9.2
resolution: "cli-spinners@npm:2.9.2"
checksum: 10/a0a863f442df35ed7294424f5491fa1756bd8d2e4ff0c8736531d886cec0ece4d85e8663b77a5afaf1d296e3cbbebff92e2e99f52bbea89b667cbe789b994794
@@ -18595,6 +19109,13 @@ __metadata:
languageName: node
linkType: hard
+"clsx@npm:2.0.0":
+ version: 2.0.0
+ resolution: "clsx@npm:2.0.0"
+ checksum: 10/943766d1b02fee3538c871e56638d87f973fbc2d6291ce221215ea436fdecb9be97ad323f411839c2d52c45640c449b1a53fbfe7e8b3d529b4e263308b630c9a
+ languageName: node
+ linkType: hard
+
"clsx@npm:^2.1.0, clsx@npm:^2.1.1":
version: 2.1.1
resolution: "clsx@npm:2.1.1"
@@ -18629,6 +19150,13 @@ __metadata:
languageName: node
linkType: hard
+"code-block-writer@npm:^12.0.0":
+ version: 12.0.0
+ resolution: "code-block-writer@npm:12.0.0"
+ checksum: 10/7dc531e652b4654f6e0487923df74cda7294da01c6ac225f523256c6ae5f7f4eb5c4dc7902a9e64b81dba4b22e7d843454ed71a59954d31aa8656184c6c0c8ff
+ languageName: node
+ linkType: hard
+
"code-excerpt@npm:^4.0.0":
version: 4.0.0
resolution: "code-excerpt@npm:4.0.0"
@@ -18770,7 +19298,7 @@ __metadata:
languageName: node
linkType: hard
-"commander@npm:^10.0.1":
+"commander@npm:^10.0.0, commander@npm:^10.0.1":
version: 10.0.1
resolution: "commander@npm:10.0.1"
checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb
@@ -18791,7 +19319,7 @@ __metadata:
languageName: node
linkType: hard
-"commander@npm:^4.1.1":
+"commander@npm:^4.0.0, commander@npm:^4.1.1":
version: 4.1.1
resolution: "commander@npm:4.1.1"
checksum: 10/3b2dc4125f387dab73b3294dbcb0ab2a862f9c0ad748ee2b27e3544d25325b7a8cdfbcc228d103a98a716960b14478114a5206b5415bd48cdafa38797891562c
@@ -19640,6 +20168,13 @@ __metadata:
languageName: node
linkType: hard
+"data-uri-to-buffer@npm:^4.0.0":
+ version: 4.0.1
+ resolution: "data-uri-to-buffer@npm:4.0.1"
+ checksum: 10/0d0790b67ffec5302f204c2ccca4494f70b4e2d940fea3d36b09f0bb2b8539c2e86690429eb1f1dc4bcc9e4df0644193073e63d9ee48ac9fce79ec1506e4aa4c
+ languageName: node
+ linkType: hard
+
"data-view-buffer@npm:^1.0.1":
version: 1.0.1
resolution: "data-view-buffer@npm:1.0.1"
@@ -20129,6 +20664,13 @@ __metadata:
languageName: node
linkType: hard
+"didyoumean@npm:^1.2.2":
+ version: 1.2.2
+ resolution: "didyoumean@npm:1.2.2"
+ checksum: 10/de7f11b6a0c8c61018629b7f405bb9746d6e994ce87c1a4b7655c3c718442dc69037a3d46d804950604fd9cbe85c074f7b224a119fc1bda851690a74540c6cf8
+ languageName: node
+ linkType: hard
+
"diff-match-patch@npm:^1.0.0":
version: 1.0.5
resolution: "diff-match-patch@npm:1.0.5"
@@ -20157,7 +20699,7 @@ __metadata:
languageName: node
linkType: hard
-"diff@npm:^5.0.0, diff@npm:^5.2.0":
+"diff@npm:^5.0.0, diff@npm:^5.1.0, diff@npm:^5.2.0":
version: 5.2.0
resolution: "diff@npm:5.2.0"
checksum: 10/01b7b440f83a997350a988e9d2f558366c0f90f15be19f4aa7f1bb3109a4e153dfc3b9fbf78e14ea725717017407eeaa2271e3896374a0181e8f52445740846d
@@ -20202,6 +20744,13 @@ __metadata:
languageName: node
linkType: hard
+"dlv@npm:^1.1.3":
+ version: 1.1.3
+ resolution: "dlv@npm:1.1.3"
+ checksum: 10/836459ec6b50e43e9ed388a5fc28954be99e3481af3fa4b5d82a600762eb65ef8faacd454097ed7fc2f8a60aea2800d65a4cece5cd0d81ab82b2031f3f759e6e
+ languageName: node
+ linkType: hard
+
"dnd-core@npm:^16.0.1":
version: 16.0.1
resolution: "dnd-core@npm:16.0.1"
@@ -20679,6 +21228,34 @@ __metadata:
languageName: node
linkType: hard
+"embla-carousel-react@npm:^8.1.4":
+ version: 8.1.4
+ resolution: "embla-carousel-react@npm:8.1.4"
+ dependencies:
+ embla-carousel: "npm:8.1.4"
+ embla-carousel-reactive-utils: "npm:8.1.4"
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.1 || ^18.0.0
+ checksum: 10/593a90ce2f3d6e310f4f0e3f512090deb5af11d23b7f3f937c3c0b7f1e6caecf9db1d668188dc26fb448e22ee2513388c8749b0299026d07d9403427ab873e4b
+ languageName: node
+ linkType: hard
+
+"embla-carousel-reactive-utils@npm:8.1.4":
+ version: 8.1.4
+ resolution: "embla-carousel-reactive-utils@npm:8.1.4"
+ peerDependencies:
+ embla-carousel: 8.1.4
+ checksum: 10/c8b77b0b6d88d4ac63c6362d33ccee1dbdba7e8456f0ef9c60e6a304959bf7a2a6eef6595579bd7f5d6606f60fb983486442d6111737809a4012b9901f9be3f2
+ languageName: node
+ linkType: hard
+
+"embla-carousel@npm:8.1.4":
+ version: 8.1.4
+ resolution: "embla-carousel@npm:8.1.4"
+ checksum: 10/2ae58fa54d512ad53da66e63bbd0b29f16ca249fd38517aec726bb0c3fd0a4cf636298d46ff0ab98414330f6fbf4b9671ad12f083450fe25b2f3b15b519f3bf0
+ languageName: node
+ linkType: hard
+
"emittery@npm:^0.13.1":
version: 0.13.1
resolution: "emittery@npm:0.13.1"
@@ -21973,6 +22550,23 @@ __metadata:
languageName: node
linkType: hard
+"execa@npm:^7.0.0":
+ version: 7.2.0
+ resolution: "execa@npm:7.2.0"
+ dependencies:
+ cross-spawn: "npm:^7.0.3"
+ get-stream: "npm:^6.0.1"
+ human-signals: "npm:^4.3.0"
+ is-stream: "npm:^3.0.0"
+ merge-stream: "npm:^2.0.0"
+ npm-run-path: "npm:^5.1.0"
+ onetime: "npm:^6.0.0"
+ signal-exit: "npm:^3.0.7"
+ strip-final-newline: "npm:^3.0.0"
+ checksum: 10/473feff60f9d4dbe799225948de48b5158c1723021d19c4b982afe37bcd111ae84e1b4c9dfe967fae5101b0894b1a62e4dd564a286dfa3e46d7b0cfdbf7fe62b
+ languageName: node
+ linkType: hard
+
"execa@npm:^8.0.1, execa@npm:~8.0.1":
version: 8.0.1
resolution: "execa@npm:8.0.1"
@@ -22192,7 +22786,7 @@ __metadata:
languageName: node
linkType: hard
-"fast-glob@npm:3.3.2, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2":
+"fast-glob@npm:3.3.2, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2":
version: 3.3.2
resolution: "fast-glob@npm:3.3.2"
dependencies:
@@ -22331,6 +22925,16 @@ __metadata:
languageName: node
linkType: hard
+"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4":
+ version: 3.2.0
+ resolution: "fetch-blob@npm:3.2.0"
+ dependencies:
+ node-domexception: "npm:^1.0.0"
+ web-streams-polyfill: "npm:^3.0.3"
+ checksum: 10/5264ecceb5fdc19eb51d1d0359921f12730941e333019e673e71eb73921146dceabcb0b8f534582be4497312d656508a439ad0f5edeec2b29ab2e10c72a1f86b
+ languageName: node
+ linkType: hard
+
"fetch-retry@npm:^5.0.2":
version: 5.0.6
resolution: "fetch-retry@npm:5.0.6"
@@ -22696,6 +23300,15 @@ __metadata:
languageName: node
linkType: hard
+"formdata-polyfill@npm:^4.0.10":
+ version: 4.0.10
+ resolution: "formdata-polyfill@npm:4.0.10"
+ dependencies:
+ fetch-blob: "npm:^3.1.2"
+ checksum: 10/9b5001d2edef3c9449ac3f48bd4f8cc92e7d0f2e7c1a5c8ba555ad4e77535cc5cf621fabe49e97f304067037282dd9093b9160a3cb533e46420b446c4e6bc06f
+ languageName: node
+ linkType: hard
+
"formidable@npm:^3.5.1":
version: 3.5.1
resolution: "formidable@npm:3.5.1"
@@ -22729,6 +23342,13 @@ __metadata:
languageName: node
linkType: hard
+"fraction.js@npm:^4.3.7":
+ version: 4.3.7
+ resolution: "fraction.js@npm:4.3.7"
+ checksum: 10/bb5ebcdeeffcdc37b68ead3bdfc244e68de188e0c64e9702197333c72963b95cc798883ad16adc21588088b942bca5b6a6ff4aeb1362d19f6f3b629035dc15f5
+ languageName: node
+ linkType: hard
+
"fractional-indexing@npm:^3.2.0":
version: 3.2.0
resolution: "fractional-indexing@npm:3.2.0"
@@ -23196,7 +23816,7 @@ __metadata:
languageName: node
linkType: hard
-"get-stream@npm:^6.0.0":
+"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1":
version: 6.0.1
resolution: "get-stream@npm:6.0.1"
checksum: 10/781266d29725f35c59f1d214aedc92b0ae855800a980800e2923b3fbc4e56b3cb6e462c42e09a1cf1a00c64e056a78fa407cbe06c7c92b7e5cd49b4b85c2a497
@@ -24355,6 +24975,16 @@ __metadata:
languageName: node
linkType: hard
+"https-proxy-agent@npm:^6.2.0":
+ version: 6.2.1
+ resolution: "https-proxy-agent@npm:6.2.1"
+ dependencies:
+ agent-base: "npm:^7.0.2"
+ debug: "npm:4"
+ checksum: 10/d5485f779961231f1865afea362da08aba7b79ab64448b787bc6356561ef0598af5fa795219a78aa8c45810ea3f526426c20d05fc06f9867d6a8de03dfd55543
+ languageName: node
+ linkType: hard
+
"https-proxy-agent@npm:^7.0.0, https-proxy-agent@npm:^7.0.1":
version: 7.0.4
resolution: "https-proxy-agent@npm:7.0.4"
@@ -24372,6 +25002,13 @@ __metadata:
languageName: node
linkType: hard
+"human-signals@npm:^4.3.0":
+ version: 4.3.1
+ resolution: "human-signals@npm:4.3.1"
+ checksum: 10/fa59894c358fe9f2b5549be2fb083661d5e1dff618d3ac70a49ca73495a72e873fbf6c0878561478e521e17d498292746ee391791db95ffe5747bfb5aef8765b
+ languageName: node
+ linkType: hard
+
"human-signals@npm:^5.0.0":
version: 5.0.0
resolution: "human-signals@npm:5.0.0"
@@ -24670,6 +25307,16 @@ __metadata:
languageName: node
linkType: hard
+"input-otp@npm:^1.2.4":
+ version: 1.2.4
+ resolution: "input-otp@npm:1.2.4"
+ peerDependencies:
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ checksum: 10/dde21c35334864f0add026f6a66e87eac572278c24edb72c97ba9541e5133f3d6750a4230b9a9c6093f4bd84633e4e417c8849ef844a565834392b9119b4110f
+ languageName: node
+ linkType: hard
+
"inquirer@npm:8.2.6, inquirer@npm:^8.0.0":
version: 8.2.6
resolution: "inquirer@npm:8.2.6"
@@ -25014,6 +25661,13 @@ __metadata:
languageName: node
linkType: hard
+"is-interactive@npm:^2.0.0":
+ version: 2.0.0
+ resolution: "is-interactive@npm:2.0.0"
+ checksum: 10/e8d52ad490bed7ae665032c7675ec07732bbfe25808b0efbc4d5a76b1a1f01c165f332775c63e25e9a03d319ebb6b24f571a9e902669fc1e40b0a60b5be6e26c
+ languageName: node
+ linkType: hard
+
"is-lambda@npm:^1.0.1":
version: 1.0.1
resolution: "is-lambda@npm:1.0.1"
@@ -25284,6 +25938,13 @@ __metadata:
languageName: node
linkType: hard
+"is-unicode-supported@npm:^1.1.0":
+ version: 1.3.0
+ resolution: "is-unicode-supported@npm:1.3.0"
+ checksum: 10/20a1fc161afafaf49243551a5ac33b6c4cf0bbcce369fcd8f2951fbdd000c30698ce320de3ee6830497310a8f41880f8066d440aa3eb0a853e2aa4836dd89abc
+ languageName: node
+ linkType: hard
+
"is-upper-case@npm:^2.0.2":
version: 2.0.2
resolution: "is-upper-case@npm:2.0.2"
@@ -26139,7 +26800,7 @@ __metadata:
languageName: node
linkType: hard
-"jiti@npm:^1.17.1, jiti@npm:^1.18.2, jiti@npm:^1.19.1, jiti@npm:^1.20.0":
+"jiti@npm:^1.17.1, jiti@npm:^1.18.2, jiti@npm:^1.19.1, jiti@npm:^1.20.0, jiti@npm:^1.21.0":
version: 1.21.6
resolution: "jiti@npm:1.21.6"
bin:
@@ -26657,7 +27318,14 @@ __metadata:
languageName: node
linkType: hard
-"lilconfig@npm:^3.1.1, lilconfig@npm:~3.1.1":
+"lilconfig@npm:^2.1.0":
+ version: 2.1.0
+ resolution: "lilconfig@npm:2.1.0"
+ checksum: 10/b1314a2e55319013d5e7d7d08be39015829d2764a1eaee130129545d40388499d81b1c31b0f9b3417d4db12775a88008b72ec33dd06e0184cf7503b32ca7cc0b
+ languageName: node
+ linkType: hard
+
+"lilconfig@npm:^3.0.0, lilconfig@npm:^3.1.1, lilconfig@npm:~3.1.1":
version: 3.1.2
resolution: "lilconfig@npm:3.1.2"
checksum: 10/8058403850cfad76d6041b23db23f730e52b6c17a8c28d87b90766639ca0ee40c748a3e85c2d7bd133d572efabff166c4b015e5d25e01fd666cb4b13cfada7f0
@@ -26931,6 +27599,13 @@ __metadata:
languageName: node
linkType: hard
+"lodash._reinterpolate@npm:^3.0.0":
+ version: 3.0.0
+ resolution: "lodash._reinterpolate@npm:3.0.0"
+ checksum: 10/06d2d5f33169604fa5e9f27b6067ed9fb85d51a84202a656901e5ffb63b426781a601508466f039c720af111b0c685d12f1a5c14ff8df5d5f27e491e562784b2
+ languageName: node
+ linkType: hard
+
"lodash.camelcase@npm:^4.3.0":
version: 4.3.0
resolution: "lodash.camelcase@npm:4.3.0"
@@ -27057,6 +27732,25 @@ __metadata:
languageName: node
linkType: hard
+"lodash.template@npm:^4.5.0":
+ version: 4.5.0
+ resolution: "lodash.template@npm:4.5.0"
+ dependencies:
+ lodash._reinterpolate: "npm:^3.0.0"
+ lodash.templatesettings: "npm:^4.0.0"
+ checksum: 10/56d18ba410ff591f22e4dd2974d21fdcfcba392f2d462ee4b7a7368c3a28ac1cb38a73f1d1c9eb8b8cae26f8e0ae2c28058f7488b4ffa9da84a6096bc77691db
+ languageName: node
+ linkType: hard
+
+"lodash.templatesettings@npm:^4.0.0":
+ version: 4.2.0
+ resolution: "lodash.templatesettings@npm:4.2.0"
+ dependencies:
+ lodash._reinterpolate: "npm:^3.0.0"
+ checksum: 10/ef470fa8b66b6370b08fb0709c1577e4bf72cc3d1e8639196577db827915808ec138861cbc791b295a24fbfe7b78dd26bcfc8f237e5d94df383a3125ae6f5339
+ languageName: node
+ linkType: hard
+
"lodash.truncate@npm:^4.4.2":
version: 4.4.2
resolution: "lodash.truncate@npm:4.4.2"
@@ -27095,6 +27789,16 @@ __metadata:
languageName: node
linkType: hard
+"log-symbols@npm:^5.1.0":
+ version: 5.1.0
+ resolution: "log-symbols@npm:5.1.0"
+ dependencies:
+ chalk: "npm:^5.0.0"
+ is-unicode-supported: "npm:^1.1.0"
+ checksum: 10/7291b6e7f1b3df6865bdaeb9b59605c832668ac2fa0965c63b1e7dd3700349aec09c1d7d40c368d5041ff58b7f89461a56e4009471921301af7b3609cbff9a29
+ languageName: node
+ linkType: hard
+
"log-update@npm:^4.0.0":
version: 4.0.0
resolution: "log-update@npm:4.0.0"
@@ -27257,6 +27961,15 @@ __metadata:
languageName: node
linkType: hard
+"lucide-react@npm:^0.394.0":
+ version: 0.394.0
+ resolution: "lucide-react@npm:0.394.0"
+ peerDependencies:
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0
+ checksum: 10/5933b227c66370629cfc32402fc28e61369424410843c187d8c5d22316782249b1fc465846123f1b6d68f6019aff79493b6e6e398ae79ff4e850518aa9739ba7
+ languageName: node
+ linkType: hard
+
"lunr@npm:^2.3.9":
version: 2.3.9
resolution: "lunr@npm:2.3.9"
@@ -28718,6 +29431,15 @@ __metadata:
languageName: node
linkType: hard
+"minimatch@npm:^7.4.3":
+ version: 7.4.6
+ resolution: "minimatch@npm:7.4.6"
+ dependencies:
+ brace-expansion: "npm:^2.0.1"
+ checksum: 10/0046ba1161ac6414bde1b07c440792ebcdb2ed93e6714c85c73974332b709b7e692801550bc9da22028a8613407b3f13861e17dd0dd44f4babdeacd44950430b
+ languageName: node
+ linkType: hard
+
"minimatch@npm:^8.0.2":
version: 8.0.4
resolution: "minimatch@npm:8.0.4"
@@ -28919,6 +29641,15 @@ __metadata:
languageName: node
linkType: hard
+"mkdirp@npm:^2.1.6":
+ version: 2.1.6
+ resolution: "mkdirp@npm:2.1.6"
+ bin:
+ mkdirp: dist/cjs/src/bin.js
+ checksum: 10/4672fadb94dca8d2eafeb6fff53f2c5ea74e885565ef23251791709064f216105167c2387088c61ef068901bd0776648999785e341d74728164fa551b1c65996
+ languageName: node
+ linkType: hard
+
"mlly@npm:^1.4.2, mlly@npm:^1.7.0":
version: 1.7.1
resolution: "mlly@npm:1.7.1"
@@ -29107,6 +29838,17 @@ __metadata:
languageName: node
linkType: hard
+"mz@npm:^2.7.0":
+ version: 2.7.0
+ resolution: "mz@npm:2.7.0"
+ dependencies:
+ any-promise: "npm:^1.0.0"
+ object-assign: "npm:^4.0.1"
+ thenify-all: "npm:^1.0.0"
+ checksum: 10/8427de0ece99a07e9faed3c0c6778820d7543e3776f9a84d22cf0ec0a8eb65f6e9aee9c9d353ff9a105ff62d33a9463c6ca638974cc652ee8140cd1e35951c87
+ languageName: node
+ linkType: hard
+
"nanoid@npm:^3.3.3, nanoid@npm:^3.3.7":
version: 3.3.7
resolution: "nanoid@npm:3.3.7"
@@ -29257,7 +29999,7 @@ __metadata:
languageName: node
linkType: hard
-"node-domexception@npm:1.0.0":
+"node-domexception@npm:1.0.0, node-domexception@npm:^1.0.0":
version: 1.0.0
resolution: "node-domexception@npm:1.0.0"
checksum: 10/e332522f242348c511640c25a6fc7da4f30e09e580c70c6b13cb0be83c78c3e71c8d4665af2527e869fc96848924a4316ae7ec9014c091e2156f41739d4fa233
@@ -29299,6 +30041,17 @@ __metadata:
languageName: node
linkType: hard
+"node-fetch@npm:^3.3.0":
+ version: 3.3.2
+ resolution: "node-fetch@npm:3.3.2"
+ dependencies:
+ data-uri-to-buffer: "npm:^4.0.0"
+ fetch-blob: "npm:^3.1.4"
+ formdata-polyfill: "npm:^4.0.10"
+ checksum: 10/24207ca8c81231c7c59151840e3fded461d67a31cf3e3b3968e12201a42f89ce4a0b5fb7079b1fa0a4655957b1ca9257553200f03a9f668b45ebad265ca5593d
+ languageName: node
+ linkType: hard
+
"node-forge@npm:^1":
version: 1.3.1
resolution: "node-forge@npm:1.3.1"
@@ -29483,6 +30236,13 @@ __metadata:
languageName: node
linkType: hard
+"normalize-range@npm:^0.1.2":
+ version: 0.1.2
+ resolution: "normalize-range@npm:0.1.2"
+ checksum: 10/9b2f14f093593f367a7a0834267c24f3cb3e887a2d9809c77d8a7e5fd08738bcd15af46f0ab01cc3a3d660386f015816b5c922cea8bf2ee79777f40874063184
+ languageName: node
+ linkType: hard
+
"normalize-url@npm:^6.0.1":
version: 6.1.0
resolution: "normalize-url@npm:6.1.0"
@@ -29769,14 +30529,14 @@ __metadata:
languageName: node
linkType: hard
-"object-assign@npm:^4, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1":
+"object-assign@npm:^4, object-assign@npm:^4.0.1, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1":
version: 4.1.1
resolution: "object-assign@npm:4.1.1"
checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f
languageName: node
linkType: hard
-"object-hash@npm:3.0.0":
+"object-hash@npm:3.0.0, object-hash@npm:^3.0.0":
version: 3.0.0
resolution: "object-hash@npm:3.0.0"
checksum: 10/f498d456a20512ba7be500cef4cf7b3c183cc72c65372a549c9a0e6dd78ce26f375e9b1315c07592d3fde8f10d5019986eba35970570d477ed9a2a702514432a
@@ -30005,6 +30765,23 @@ __metadata:
languageName: node
linkType: hard
+"ora@npm:^6.1.2":
+ version: 6.3.1
+ resolution: "ora@npm:6.3.1"
+ dependencies:
+ chalk: "npm:^5.0.0"
+ cli-cursor: "npm:^4.0.0"
+ cli-spinners: "npm:^2.6.1"
+ is-interactive: "npm:^2.0.0"
+ is-unicode-supported: "npm:^1.1.0"
+ log-symbols: "npm:^5.1.0"
+ stdin-discarder: "npm:^0.1.0"
+ strip-ansi: "npm:^7.0.1"
+ wcwidth: "npm:^1.0.1"
+ checksum: 10/6c885f2a9e5ec6815477c78955a1c9c460c221063f078077d8a02bb50f9aedf390fddb321c6821cd107b3d250114a53fffbde65b705280ea8b77810bf4fc6e2c
+ languageName: node
+ linkType: hard
+
"os-homedir@npm:^1.0.1":
version: 1.0.2
resolution: "os-homedir@npm:1.0.2"
@@ -30673,7 +31450,7 @@ __metadata:
languageName: node
linkType: hard
-"pify@npm:^2.0.0":
+"pify@npm:^2.0.0, pify@npm:^2.3.0":
version: 2.3.0
resolution: "pify@npm:2.3.0"
checksum: 10/9503aaeaf4577acc58642ad1d25c45c6d90288596238fb68f82811c08104c800e5a7870398e9f015d82b44ecbcbef3dc3d4251a1cbb582f6e5959fe09884b2ba
@@ -30687,7 +31464,7 @@ __metadata:
languageName: node
linkType: hard
-"pirates@npm:^4.0.4, pirates@npm:^4.0.6":
+"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.6":
version: 4.0.6
resolution: "pirates@npm:4.0.6"
checksum: 10/d02dda76f4fec1cbdf395c36c11cf26f76a644f9f9a1bfa84d3167d0d3154d5289aacc72677aa20d599bb4a6937a471de1b65c995e2aea2d8687cbcd7e43ea5f
@@ -30866,6 +31643,48 @@ __metadata:
languageName: node
linkType: hard
+"postcss-import@npm:^15.1.0":
+ version: 15.1.0
+ resolution: "postcss-import@npm:15.1.0"
+ dependencies:
+ postcss-value-parser: "npm:^4.0.0"
+ read-cache: "npm:^1.0.0"
+ resolve: "npm:^1.1.7"
+ peerDependencies:
+ postcss: ^8.0.0
+ checksum: 10/33c91b7e6b794b5c33d7d7d4730e5f0729c131d2de1ada7fcc116955625a78c3ce613983f019fa9447681795cf3f851e9c38dfbe3f48a2d08a8aef917c70a32a
+ languageName: node
+ linkType: hard
+
+"postcss-js@npm:^4.0.1":
+ version: 4.0.1
+ resolution: "postcss-js@npm:4.0.1"
+ dependencies:
+ camelcase-css: "npm:^2.0.1"
+ peerDependencies:
+ postcss: ^8.4.21
+ checksum: 10/ef2cfe8554daab4166cfcb290f376e7387964c36503f5bd42008778dba735685af8d4f5e0aba67cae999f47c855df40a1cd31ae840e0df320ded36352581045e
+ languageName: node
+ linkType: hard
+
+"postcss-load-config@npm:^4.0.1":
+ version: 4.0.2
+ resolution: "postcss-load-config@npm:4.0.2"
+ dependencies:
+ lilconfig: "npm:^3.0.0"
+ yaml: "npm:^2.3.4"
+ peerDependencies:
+ postcss: ">=8.0.9"
+ ts-node: ">=9.0.0"
+ peerDependenciesMeta:
+ postcss:
+ optional: true
+ ts-node:
+ optional: true
+ checksum: 10/e2c2ed9b7998a5b123e1ce0c124daf6504b1454c67dcc1c8fdbcc5ffb2597b7de245e3ac34f63afc928d3fd3260b1e36492ebbdb01a9ff63f16b3c8b7b925d1b
+ languageName: node
+ linkType: hard
+
"postcss-loader@npm:^8.1.1":
version: 8.1.1
resolution: "postcss-loader@npm:8.1.1"
@@ -31004,6 +31823,17 @@ __metadata:
languageName: node
linkType: hard
+"postcss-nested@npm:^6.0.1":
+ version: 6.0.1
+ resolution: "postcss-nested@npm:6.0.1"
+ dependencies:
+ postcss-selector-parser: "npm:^6.0.11"
+ peerDependencies:
+ postcss: ^8.2.14
+ checksum: 10/02aaac682f599879fae6aab3210aee59b8b5bde3ba242527f6fd103726955b74ffa05c2b765920be5f403e758045582534d11b1e19add01586c19743ed99e3fe
+ languageName: node
+ linkType: hard
+
"postcss-normalize-charset@npm:^7.0.0":
version: 7.0.0
resolution: "postcss-normalize-charset@npm:7.0.0"
@@ -31137,7 +31967,7 @@ __metadata:
languageName: node
linkType: hard
-"postcss-selector-parser@npm:^6.0.15, postcss-selector-parser@npm:^6.0.16, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.1.0":
+"postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.15, postcss-selector-parser@npm:^6.0.16, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.1.0":
version: 6.1.0
resolution: "postcss-selector-parser@npm:6.1.0"
dependencies:
@@ -31170,14 +32000,14 @@ __metadata:
languageName: node
linkType: hard
-"postcss-value-parser@npm:^4.1.0, postcss-value-parser@npm:^4.2.0":
+"postcss-value-parser@npm:^4.0.0, postcss-value-parser@npm:^4.1.0, postcss-value-parser@npm:^4.2.0":
version: 4.2.0
resolution: "postcss-value-parser@npm:4.2.0"
checksum: 10/e4e4486f33b3163a606a6ed94f9c196ab49a37a7a7163abfcd469e5f113210120d70b8dd5e33d64636f41ad52316a3725655421eb9a1094f1bcab1db2f555c62
languageName: node
linkType: hard
-"postcss@npm:^8.4.33, postcss@npm:^8.4.38":
+"postcss@npm:^8.4.23, postcss@npm:^8.4.33, postcss@npm:^8.4.38":
version: 8.4.38
resolution: "postcss@npm:8.4.38"
dependencies:
@@ -31411,7 +32241,7 @@ __metadata:
languageName: node
linkType: hard
-"prompts@npm:^2.0.1, prompts@npm:^2.4.0, prompts@npm:^2.4.1, prompts@npm:~2.4.2":
+"prompts@npm:^2.0.1, prompts@npm:^2.4.0, prompts@npm:^2.4.1, prompts@npm:^2.4.2, prompts@npm:~2.4.2":
version: 2.4.2
resolution: "prompts@npm:2.4.2"
dependencies:
@@ -31738,6 +32568,16 @@ __metadata:
languageName: node
linkType: hard
+"react-day-picker@npm:^8.10.1":
+ version: 8.10.1
+ resolution: "react-day-picker@npm:8.10.1"
+ peerDependencies:
+ date-fns: ^2.28.0 || ^3.0.0
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0
+ checksum: 10/374056dca7fed70a154a3b0e98c6c746c26b4fc868548fa8f285ef3cab9679537e84c0c21ba7b6db67b3f7f54cc562f5d83efba2c7f2c7bd3705ac8992869607
+ languageName: node
+ linkType: hard
+
"react-dnd@npm:*":
version: 16.0.1
resolution: "react-dnd@npm:16.0.1"
@@ -31790,7 +32630,7 @@ __metadata:
languageName: node
linkType: hard
-"react-dom@npm:18.3.1, react-dom@npm:^18.2.0":
+"react-dom@npm:18.3.1, react-dom@npm:^18.2.0, react-dom@npm:^18.3.1":
version: 18.3.1
resolution: "react-dom@npm:18.3.1"
dependencies:
@@ -31827,6 +32667,15 @@ __metadata:
languageName: node
linkType: hard
+"react-hook-form@npm:^7.51.5":
+ version: 7.51.5
+ resolution: "react-hook-form@npm:7.51.5"
+ peerDependencies:
+ react: ^16.8.0 || ^17 || ^18
+ checksum: 10/f4ff77989202b1faf2dede7a7730210635a6225189dcaeaeb191cea12422bcb97d2adfef0712c50d13bf5c5e14b8debc00fbba16491f86a6d24945a52cacfa59
+ languageName: node
+ linkType: hard
+
"react-i18next@npm:^14.1.0":
version: 14.1.2
resolution: "react-i18next@npm:14.1.2"
@@ -31981,7 +32830,17 @@ __metadata:
languageName: node
linkType: hard
-"react-router-dom@npm:^6.22.3":
+"react-resizable-panels@npm:^2.0.19":
+ version: 2.0.19
+ resolution: "react-resizable-panels@npm:2.0.19"
+ peerDependencies:
+ react: ^16.14.0 || ^17.0.0 || ^18.0.0
+ react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0
+ checksum: 10/ac283f1667d2d41da32274b10875c430acff90bef977760e9f3944452be1ebbf4d7ed8909187d5b6a921b493a0a5e6a8e6215fa3d19370a11b2ffbc1a04b7811
+ languageName: node
+ linkType: hard
+
+"react-router-dom@npm:^6.22.3, react-router-dom@npm:^6.23.1":
version: 6.23.1
resolution: "react-router-dom@npm:6.23.1"
dependencies:
@@ -32055,7 +32914,7 @@ __metadata:
languageName: node
linkType: hard
-"react@npm:18.3.1, react@npm:^18.2.0":
+"react@npm:18.3.1, react@npm:^18.2.0, react@npm:^18.3.1":
version: 18.3.1
resolution: "react@npm:18.3.1"
dependencies:
@@ -32075,6 +32934,15 @@ __metadata:
languageName: node
linkType: hard
+"read-cache@npm:^1.0.0":
+ version: 1.0.0
+ resolution: "read-cache@npm:1.0.0"
+ dependencies:
+ pify: "npm:^2.3.0"
+ checksum: 10/83a39149d9dfa38f0c482ea0d77b34773c92fef07fe7599cdd914d255b14d0453e0229ef6379d8d27d6947f42d7581635296d0cfa7708f05a9bd8e789d398b31
+ languageName: node
+ linkType: hard
+
"read-config-file@npm:6.3.2":
version: 6.3.2
resolution: "read-config-file@npm:6.3.2"
@@ -32180,7 +33048,7 @@ __metadata:
languageName: node
linkType: hard
-"recast@npm:^0.23.1, recast@npm:^0.23.3, recast@npm:^0.23.5":
+"recast@npm:^0.23.1, recast@npm:^0.23.2, recast@npm:^0.23.3, recast@npm:^0.23.5":
version: 0.23.9
resolution: "recast@npm:0.23.9"
dependencies:
@@ -32651,7 +33519,7 @@ __metadata:
languageName: node
linkType: hard
-"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4, resolve@npm:^1.22.8, resolve@npm:~1.22.1":
+"resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.4, resolve@npm:^1.22.8, resolve@npm:~1.22.1":
version: 1.22.8
resolution: "resolve@npm:1.22.8"
dependencies:
@@ -32687,7 +33555,7 @@ __metadata:
languageName: node
linkType: hard
-"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.12.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A~1.22.1#optional!builtin<compat/resolve>":
+"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.12.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A~1.22.1#optional!builtin<compat/resolve>":
version: 1.22.8
resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin<compat/resolve>::version=1.22.8&hash=c3c19d"
dependencies:
@@ -33384,6 +34252,36 @@ __metadata:
languageName: node
linkType: hard
+"shadcn-ui@npm:^0.8.0":
+ version: 0.8.0
+ resolution: "shadcn-ui@npm:0.8.0"
+ dependencies:
+ "@antfu/ni": "npm:^0.21.4"
+ "@babel/core": "npm:^7.22.1"
+ "@babel/parser": "npm:^7.22.6"
+ "@babel/plugin-transform-typescript": "npm:^7.22.5"
+ chalk: "npm:5.2.0"
+ commander: "npm:^10.0.0"
+ cosmiconfig: "npm:^8.1.3"
+ diff: "npm:^5.1.0"
+ execa: "npm:^7.0.0"
+ fast-glob: "npm:^3.3.2"
+ fs-extra: "npm:^11.1.0"
+ https-proxy-agent: "npm:^6.2.0"
+ lodash.template: "npm:^4.5.0"
+ node-fetch: "npm:^3.3.0"
+ ora: "npm:^6.1.2"
+ prompts: "npm:^2.4.2"
+ recast: "npm:^0.23.2"
+ ts-morph: "npm:^18.0.0"
+ tsconfig-paths: "npm:^4.2.0"
+ zod: "npm:^3.20.2"
+ bin:
+ shadcn-ui: dist/index.js
+ checksum: 10/97300e59572464ce47ee479f1e7c79d5f1275be076deb49482149427acd9553056cf017eec246533a3ac2435092bba5c1455c0347d5a55f685c0e095c8361941
+ languageName: node
+ linkType: hard
+
"shallow-clone@npm:^3.0.0":
version: 3.0.1
resolution: "shallow-clone@npm:3.0.1"
@@ -33826,7 +34724,7 @@ __metadata:
languageName: node
linkType: hard
-"sonner@npm:^1.4.41":
+"sonner@npm:^1.4.41, sonner@npm:^1.5.0":
version: 1.5.0
resolution: "sonner@npm:1.5.0"
peerDependencies:
@@ -34181,6 +35079,15 @@ __metadata:
languageName: node
linkType: hard
+"stdin-discarder@npm:^0.1.0":
+ version: 0.1.0
+ resolution: "stdin-discarder@npm:0.1.0"
+ dependencies:
+ bl: "npm:^5.0.0"
+ checksum: 10/85131f70ae2830144133b7a6211d56f9ac2603573f4af3d0b66e828af5e13fcdea351f9192f86bb7fed2c64604c8097bf36d50cb77d54e898ce4604c3b7b6b8f
+ languageName: node
+ linkType: hard
+
"stoppable@npm:^1.1.0":
version: 1.1.0
resolution: "stoppable@npm:1.1.0"
@@ -34572,6 +35479,24 @@ __metadata:
languageName: node
linkType: hard
+"sucrase@npm:^3.32.0":
+ version: 3.35.0
+ resolution: "sucrase@npm:3.35.0"
+ dependencies:
+ "@jridgewell/gen-mapping": "npm:^0.3.2"
+ commander: "npm:^4.0.0"
+ glob: "npm:^10.3.10"
+ lines-and-columns: "npm:^1.1.6"
+ mz: "npm:^2.7.0"
+ pirates: "npm:^4.0.1"
+ ts-interface-checker: "npm:^0.1.9"
+ bin:
+ sucrase: bin/sucrase
+ sucrase-node: bin/sucrase-node
+ checksum: 10/bc601558a62826f1c32287d4fdfa4f2c09fe0fec4c4d39d0e257fd9116d7d6227a18309721d4185ec84c9dc1af0d5ec0e05a42a337fbb74fc293e068549aacbe
+ languageName: node
+ linkType: hard
+
"sudo-prompt@npm:^9.1.1":
version: 9.2.1
resolution: "sudo-prompt@npm:9.2.1"
@@ -34755,6 +35680,57 @@ __metadata:
languageName: node
linkType: hard
+"tailwind-merge@npm:^2.3.0":
+ version: 2.3.0
+ resolution: "tailwind-merge@npm:2.3.0"
+ dependencies:
+ "@babel/runtime": "npm:^7.24.1"
+ checksum: 10/cf3b126bee82bc9ff3f60f9601b66925418db6906544198b637487b25fba1c9c307734ca37ccb8fa2355f69ad0c5aff34c5dce460809addb459a93205d9a0abe
+ languageName: node
+ linkType: hard
+
+"tailwindcss-animate@npm:^1.0.7":
+ version: 1.0.7
+ resolution: "tailwindcss-animate@npm:1.0.7"
+ peerDependencies:
+ tailwindcss: "*"
+ checksum: 10/ef176fbb0bf9dca84178b35b6a9615cd756358ea80be9c575456d12ecd7f3c431e9e571915c7df72959dc798a730959e9a4739d59eab55d8cc6db390870ff0d2
+ languageName: node
+ linkType: hard
+
+"tailwindcss@npm:^3.4.4":
+ version: 3.4.4
+ resolution: "tailwindcss@npm:3.4.4"
+ dependencies:
+ "@alloc/quick-lru": "npm:^5.2.0"
+ arg: "npm:^5.0.2"
+ chokidar: "npm:^3.5.3"
+ didyoumean: "npm:^1.2.2"
+ dlv: "npm:^1.1.3"
+ fast-glob: "npm:^3.3.0"
+ glob-parent: "npm:^6.0.2"
+ is-glob: "npm:^4.0.3"
+ jiti: "npm:^1.21.0"
+ lilconfig: "npm:^2.1.0"
+ micromatch: "npm:^4.0.5"
+ normalize-path: "npm:^3.0.0"
+ object-hash: "npm:^3.0.0"
+ picocolors: "npm:^1.0.0"
+ postcss: "npm:^8.4.23"
+ postcss-import: "npm:^15.1.0"
+ postcss-js: "npm:^4.0.1"
+ postcss-load-config: "npm:^4.0.1"
+ postcss-nested: "npm:^6.0.1"
+ postcss-selector-parser: "npm:^6.0.11"
+ resolve: "npm:^1.22.2"
+ sucrase: "npm:^3.32.0"
+ bin:
+ tailwind: lib/cli.js
+ tailwindcss: lib/cli.js
+ checksum: 10/ab120014a68517c079fbeecba06c404ac94088a959b5b5e631214af4d87b332b6e4b28d8453f65eac9d94759a030ca581b1330f7d73cbf497883c4e2de083432
+ languageName: node
+ linkType: hard
+
"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1":
version: 2.2.1
resolution: "tapable@npm:2.2.1"
@@ -34968,6 +35944,24 @@ __metadata:
languageName: node
linkType: hard
+"thenify-all@npm:^1.0.0":
+ version: 1.6.0
+ resolution: "thenify-all@npm:1.6.0"
+ dependencies:
+ thenify: "npm:>= 3.1.0 < 4"
+ checksum: 10/dba7cc8a23a154cdcb6acb7f51d61511c37a6b077ec5ab5da6e8b874272015937788402fd271fdfc5f187f8cb0948e38d0a42dcc89d554d731652ab458f5343e
+ languageName: node
+ linkType: hard
+
+"thenify@npm:>= 3.1.0 < 4":
+ version: 3.3.1
+ resolution: "thenify@npm:3.3.1"
+ dependencies:
+ any-promise: "npm:^1.0.0"
+ checksum: 10/486e1283a867440a904e36741ff1a177faa827cf94d69506f7e3ae4187b9afdf9ec368b3d8da225c192bfe2eb943f3f0080594156bf39f21b57cd1411e2e7f6d
+ languageName: node
+ linkType: hard
+
"thingies@npm:^1.20.0":
version: 1.21.0
resolution: "thingies@npm:1.21.0"
@@ -35290,6 +36284,13 @@ __metadata:
languageName: node
linkType: hard
+"ts-interface-checker@npm:^0.1.9":
+ version: 0.1.13
+ resolution: "ts-interface-checker@npm:0.1.13"
+ checksum: 10/9f7346b9e25bade7a1050c001ec5a4f7023909c0e1644c5a96ae20703a131627f081479e6622a4ecee2177283d0069e651e507bedadd3904fc4010ab28ffce00
+ languageName: node
+ linkType: hard
+
"ts-log@npm:^2.2.3":
version: 2.2.5
resolution: "ts-log@npm:2.2.5"
@@ -35297,6 +36298,16 @@ __metadata:
languageName: node
linkType: hard
+"ts-morph@npm:^18.0.0":
+ version: 18.0.0
+ resolution: "ts-morph@npm:18.0.0"
+ dependencies:
+ "@ts-morph/common": "npm:~0.19.0"
+ code-block-writer: "npm:^12.0.0"
+ checksum: 10/349215342b321ef15277394d75ec4d7035664cc10df2d3a175f3196fe5d4c5f46d071b894d4d1dff2d6278311ee97e9a314217e020b44b7ccfa831e64879c6a6
+ languageName: node
+ linkType: hard
+
"ts-node@npm:10.9.1":
version: 10.9.1
resolution: "ts-node@npm:10.9.1"
@@ -35373,7 +36384,7 @@ __metadata:
languageName: node
linkType: hard
-"tsconfig-paths@npm:^4.1.2":
+"tsconfig-paths@npm:^4.1.2, tsconfig-paths@npm:^4.2.0":
version: 4.2.0
resolution: "tsconfig-paths@npm:4.2.0"
dependencies:
@@ -36431,6 +37442,18 @@ __metadata:
languageName: node
linkType: hard
+"vaul@npm:^0.9.1":
+ version: 0.9.1
+ resolution: "vaul@npm:0.9.1"
+ dependencies:
+ "@radix-ui/react-dialog": "npm:^1.0.4"
+ peerDependencies:
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ checksum: 10/2121e13402e35abac40b568e4037fc2fc7cd7632b0cb776aae7fe24fef9e8f04f1503223d166dfad2bed95d19a0369ae0c2c50faeef7afa51ff1600576c41b8f
+ languageName: node
+ linkType: hard
+
"vfile-location@npm:^5.0.0":
version: 5.0.2
resolution: "vfile-location@npm:5.0.2"
@@ -36845,7 +37868,7 @@ __metadata:
languageName: node
linkType: hard
-"web-streams-polyfill@npm:^3.2.1":
+"web-streams-polyfill@npm:^3.0.3, web-streams-polyfill@npm:^3.2.1":
version: 3.3.3
resolution: "web-streams-polyfill@npm:3.3.3"
checksum: 10/8e7e13501b3834094a50abe7c0b6456155a55d7571312b89570012ef47ec2a46d766934768c50aabad10a9c30dd764a407623e8bfcc74fcb58495c29130edea9
@@ -37542,7 +38565,7 @@ __metadata:
languageName: node
linkType: hard
-"yaml@npm:^2.3.1, yaml@npm:~2.4.2":
+"yaml@npm:^2.3.1, yaml@npm:^2.3.4, yaml@npm:~2.4.2":
version: 2.4.5
resolution: "yaml@npm:2.4.5"
bin:
@@ -37705,7 +38728,7 @@ __metadata:
languageName: node
linkType: hard
-"zod@npm:^3.20.6, zod@npm:^3.22.4, zod@npm:^3.23.8":
+"zod@npm:^3.20.2, zod@npm:^3.20.6, zod@npm:^3.22.4, zod@npm:^3.23.8":
version: 3.23.8
resolution: "zod@npm:3.23.8"
checksum: 10/846fd73e1af0def79c19d510ea9e4a795544a67d5b34b7e1c4d0425bf6bfd1c719446d94cdfa1721c1987d891321d61f779e8236fde517dc0e524aa851a6eff1