create-efforge 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +140 -2
- package/dist/addon.js +115 -0
- package/dist/bin.js +6 -0
- package/dist/cli.js +9 -0
- package/dist/commands/add.js +440 -0
- package/dist/commands/create.js +186 -0
- package/dist/diff.js +72 -0
- package/dist/exec.js +20 -0
- package/dist/generate.js +181 -0
- package/dist/manifest.js +14 -0
- package/dist/projectName.js +41 -0
- package/dist/prompts/flow.js +111 -0
- package/dist/prompts/navigable.js +97 -0
- package/dist/routeTree.js +7 -0
- package/dist/rules.js +24 -0
- package/dist/slots.js +96 -0
- package/dist/stack.js +68 -0
- package/dist/transforms/addAlchemyResource.js +71 -0
- package/dist/transforms/addArrayItem.js +31 -0
- package/dist/transforms/addAuthPlugin.js +77 -0
- package/dist/transforms/addDevVar.js +18 -0
- package/dist/transforms/addExport.js +46 -0
- package/dist/transforms/addImport.js +11 -0
- package/dist/transforms/addLayer.js +31 -0
- package/dist/transforms/addServerFnMiddleware.js +62 -0
- package/dist/transforms/addWorkflowSecret.js +43 -0
- package/dist/transforms/addWranglerBinding.js +61 -0
- package/dist/transforms/appendAgentsSection.js +26 -0
- package/dist/transforms/errors.js +7 -0
- package/dist/transforms/index.js +40 -0
- package/dist/transforms/setWranglerValue.js +40 -0
- package/dist/transforms/util.js +219 -0
- package/dist/tree.js +1 -0
- package/dist/versions.js +73 -0
- package/dist/write.js +26 -0
- package/package.json +63 -4
- package/templates/ai/effect-ai-byok/addon.json +619 -0
- package/templates/ai/effect-ai-byok/files/core/llm-crypto.test.ts +47 -0
- package/templates/ai/effect-ai-byok/files/core/llm-crypto.ts +76 -0
- package/templates/ai/effect-ai-byok/files/core/llm-store.ts +21 -0
- package/templates/ai/effect-ai-byok/files/core/llm.ts +32 -0
- package/templates/ai/effect-ai-byok/files/drizzle/d1/20261018161056_llm_credential/migration.sql +9 -0
- package/templates/ai/effect-ai-byok/files/drizzle/d1/20261018161056_llm_credential/snapshot.json +944 -0
- package/templates/ai/effect-ai-byok/files/drizzle/pg/20261018161056_llm_credential/migration.sql +10 -0
- package/templates/ai/effect-ai-byok/files/drizzle/pg/20261018161056_llm_credential/snapshot.json +1232 -0
- package/templates/ai/effect-ai-byok/files/routes/ai.tsx +193 -0
- package/templates/ai/effect-ai-byok/files/schema/d1.ts +16 -0
- package/templates/ai/effect-ai-byok/files/schema/pg.ts +14 -0
- package/templates/ai/effect-ai-byok/files/server/ai-settings.ts +129 -0
- package/templates/ai/effect-ai-byok/files/server/ai.ts +25 -0
- package/templates/ai/effect-ai-byok/files/server/llm-env.ts +48 -0
- package/templates/ai/effect-ai-byok/files/server/llm-orgs.ts +146 -0
- package/templates/ai/effect-ai-byok/files/server/llm-provider.ts +56 -0
- package/templates/ai/effect-ai-byok/files/server/llm-store-drizzle.ts +48 -0
- package/templates/ai/effect-ai-byok/files/server/llm-store-sql-d1.ts +41 -0
- package/templates/ai/effect-ai-byok/files/server/llm-store-sql-pg.ts +41 -0
- package/templates/ai/effect-ai-byok/files/sql/d1.sql +8 -0
- package/templates/ai/effect-ai-byok/files/sql/pg.sql +8 -0
- package/templates/auth/better-auth/addon.json +424 -0
- package/templates/auth/better-auth/files/core/Auth.ts +18 -0
- package/templates/auth/better-auth/files/drizzle/d1/20261018161054_auth/migration.sql +51 -0
- package/templates/auth/better-auth/files/drizzle/d1/20261018161054_auth/snapshot.json +522 -0
- package/templates/auth/better-auth/files/drizzle/pg/20261018161053_auth/migration.sql +51 -0
- package/templates/auth/better-auth/files/drizzle/pg/20261018161053_auth/snapshot.json +680 -0
- package/templates/auth/better-auth/files/lib/auth-client.ts +4 -0
- package/templates/auth/better-auth/files/routes/app.tsx +54 -0
- package/templates/auth/better-auth/files/schema/d1/auth-schema.ts +86 -0
- package/templates/auth/better-auth/files/schema/pg/auth-schema.ts +73 -0
- package/templates/auth/better-auth/files/server/auth-live.ts +47 -0
- package/templates/auth/better-auth/files/server/session.ts +14 -0
- package/templates/auth/better-auth/files/shared/components/auth-card.tsx +32 -0
- package/templates/auth/better-auth/files/shared/components/user-menu.tsx +44 -0
- package/templates/auth/better-auth/files/shared/drizzle/d1/drizzle.config.ts +7 -0
- package/templates/auth/better-auth/files/shared/drizzle/pg/drizzle.config.ts +10 -0
- package/templates/auth/better-auth/files/shared/lib/form.ts +5 -0
- package/templates/auth/better-auth/files/shared/lib/redirect.ts +6 -0
- package/templates/auth/better-auth/files/shared/routes/app/index.tsx +54 -0
- package/templates/auth/better-auth/files/shared/routes/sign-in.tsx +85 -0
- package/templates/auth/better-auth/files/shared/routes/sign-up.tsx +91 -0
- package/templates/auth/better-auth/files/shared/server/auth-route.ts +15 -0
- package/templates/auth/better-auth/files/shared/server/auth.ts +22 -0
- package/templates/auth/better-auth/files/shared/server/db/d1-drizzle.ts +25 -0
- package/templates/auth/better-auth/files/shared/server/db/d1-effect-sql.ts +17 -0
- package/templates/auth/better-auth/files/shared/server/db/pg-drizzle.ts +32 -0
- package/templates/auth/better-auth/files/shared/server/db/pg-effect-sql.ts +29 -0
- package/templates/auth/better-auth/files/shared/server/require-session.ts +20 -0
- package/templates/auth/better-auth/files/sql/d1/0002_auth.sql +13 -0
- package/templates/auth/better-auth/files/sql/pg/0002_auth.sql +13 -0
- package/templates/auth/better-auth-orgs/addon.json +463 -0
- package/templates/auth/better-auth-orgs/files/components/org-switcher.tsx +65 -0
- package/templates/auth/better-auth-orgs/files/core/Auth.ts +20 -0
- package/templates/auth/better-auth-orgs/files/drizzle/d1/20261018161055_auth/migration.sql +88 -0
- package/templates/auth/better-auth-orgs/files/drizzle/d1/20261018161055_auth/snapshot.json +862 -0
- package/templates/auth/better-auth-orgs/files/drizzle/pg/20261018161055_auth/migration.sql +88 -0
- package/templates/auth/better-auth-orgs/files/drizzle/pg/20261018161055_auth/snapshot.json +1127 -0
- package/templates/auth/better-auth-orgs/files/lib/auth-client.ts +5 -0
- package/templates/auth/better-auth-orgs/files/routes/accept-invite.$id.tsx +68 -0
- package/templates/auth/better-auth-orgs/files/routes/app/settings/index.tsx +27 -0
- package/templates/auth/better-auth-orgs/files/routes/app/settings/members.tsx +198 -0
- package/templates/auth/better-auth-orgs/files/routes/app/settings.tsx +30 -0
- package/templates/auth/better-auth-orgs/files/routes/app.tsx +58 -0
- package/templates/auth/better-auth-orgs/files/routes/onboarding.tsx +66 -0
- package/templates/auth/better-auth-orgs/files/schema/d1/auth-schema.ts +139 -0
- package/templates/auth/better-auth-orgs/files/schema/pg/auth-schema.ts +124 -0
- package/templates/auth/better-auth-orgs/files/server/auth-live.ts +52 -0
- package/templates/auth/better-auth-orgs/files/server/session.ts +44 -0
- package/templates/auth/better-auth-orgs/files/sql/d1/0002_auth.sql +27 -0
- package/templates/auth/better-auth-orgs/files/sql/pg/0002_auth.sql +27 -0
- package/templates/base/addon.json +212 -0
- package/templates/base/files/AGENTS.md +70 -0
- package/templates/base/files/CLAUDE.md +1 -0
- package/templates/base/files/README.md +28 -0
- package/templates/base/files/core/package.json +13 -0
- package/templates/base/files/core/src/index.ts +2 -0
- package/templates/base/files/core/test/core.test.ts +4 -0
- package/templates/base/files/core/tsconfig.json +6 -0
- package/templates/base/files/gitignore +11 -0
- package/templates/base/files/pnpm-workspace.yaml +11 -0
- package/templates/base/files/root/package.json +16 -0
- package/templates/base/files/root/tsconfig.base.json +19 -0
- package/templates/base/files/root/turbo.json +9 -0
- package/templates/base/files/root/vite.config.ts +61 -0
- package/templates/base/files/web/components.json +21 -0
- package/templates/base/files/web/package.json +17 -0
- package/templates/base/files/web/src/components/theme-provider.tsx +57 -0
- package/templates/base/files/web/src/components/theme-toggle.tsx +34 -0
- package/templates/base/files/web/src/components/ui/avatar.tsx +93 -0
- package/templates/base/files/web/src/components/ui/button.tsx +61 -0
- package/templates/base/files/web/src/components/ui/card.tsx +74 -0
- package/templates/base/files/web/src/components/ui/dialog.tsx +141 -0
- package/templates/base/files/web/src/components/ui/dropdown-menu.tsx +225 -0
- package/templates/base/files/web/src/components/ui/input.tsx +20 -0
- package/templates/base/files/web/src/components/ui/label.tsx +18 -0
- package/templates/base/files/web/src/components/ui/sonner.tsx +45 -0
- package/templates/base/files/web/src/components/widgets.tsx +4 -0
- package/templates/base/files/web/src/lib/utils.ts +6 -0
- package/templates/base/files/web/src/router.tsx +12 -0
- package/templates/base/files/web/src/routes/__root.tsx +42 -0
- package/templates/base/files/web/src/routes/app/index.tsx +27 -0
- package/templates/base/files/web/src/routes/app/settings.tsx +29 -0
- package/templates/base/files/web/src/routes/app.tsx +47 -0
- package/templates/base/files/web/src/routes/index.tsx +51 -0
- package/templates/base/files/web/src/server/greeting.ts +12 -0
- package/templates/base/files/web/src/server/layers.ts +10 -0
- package/templates/base/files/web/src/server/runtime.ts +5 -0
- package/templates/base/files/web/src/styles.css +81 -0
- package/templates/base/files/web/tsconfig.json +11 -0
- package/templates/base/files/web/vite.config.ts +9 -0
- package/templates/database/d1/addon.json +118 -0
- package/templates/database/d1/files/package.json +12 -0
- package/templates/database/d1/files/tsconfig.json +5 -0
- package/templates/database/postgres/addon.json +142 -0
- package/templates/database/postgres/files/docker-compose.yml +21 -0
- package/templates/database/postgres/files/package.json +12 -0
- package/templates/database/postgres/files/runtime.ts +12 -0
- package/templates/database/postgres/files/tsconfig.json +5 -0
- package/templates/extras/browser/addon.json +173 -0
- package/templates/extras/browser/files/BrowserContainer.ts +14 -0
- package/templates/extras/browser/files/app/Dockerfile +15 -0
- package/templates/extras/browser/files/app/dockerignore +1 -0
- package/templates/extras/browser/files/app/package-lock +605 -0
- package/templates/extras/browser/files/app/package.json +9 -0
- package/templates/extras/browser/files/app/src/server.ts +78 -0
- package/templates/extras/browser/files/app/src/url-policy.ts +115 -0
- package/templates/extras/browser/files/app/tsconfig.json +6 -0
- package/templates/extras/browser/files/browser.ts +34 -0
- package/templates/extras/browser/files/core-browser.ts +21 -0
- package/templates/extras/browser/files/run-browser.ts +25 -0
- package/templates/extras/email/addon.json +182 -0
- package/templates/extras/email/files/core-mailer.ts +28 -0
- package/templates/extras/email/files/invitation-email.ts +38 -0
- package/templates/extras/email/files/mailer.ts +58 -0
- package/templates/extras/realtime/addon.json +135 -0
- package/templates/extras/realtime/files/Room.ts +46 -0
- package/templates/extras/realtime/files/core-realtime.ts +19 -0
- package/templates/extras/realtime/files/realtime-demo.tsx +40 -0
- package/templates/extras/realtime/files/realtime-limits.test.ts +32 -0
- package/templates/extras/realtime/files/realtime-limits.ts +35 -0
- package/templates/extras/realtime/files/realtime-route.ts +39 -0
- package/templates/extras/realtime/files/realtime.ts +39 -0
- package/templates/extras/realtime/files/use-room.ts +67 -0
- package/templates/extras/storage/addon.json +132 -0
- package/templates/extras/storage/files/core-storage.ts +64 -0
- package/templates/extras/storage/files/storage-route.ts +50 -0
- package/templates/extras/storage/files/storage-security.test.ts +71 -0
- package/templates/extras/storage/files/storage-security.ts +92 -0
- package/templates/extras/storage/files/storage.ts +84 -0
- package/templates/extras/workflows/addon.json +95 -0
- package/templates/extras/workflows/files/Example.ts +42 -0
- package/templates/extras/workflows/files/core-jobs.ts +45 -0
- package/templates/extras/workflows/files/example-job.ts +36 -0
- package/templates/extras/workflows/files/jobs.ts +34 -0
- package/templates/infra/alchemy/addon.json +37 -0
- package/templates/infra/alchemy/files/README.md +27 -0
- package/templates/infra/alchemy/files/alchemy.run.ts +36 -0
- package/templates/infra/alchemy/files/github/deploy.yml +63 -0
- package/templates/infra/alchemy/files/tsconfig.json +5 -0
- package/templates/infra/alchemy/files/vite.config.ts +30 -0
- package/templates/orm/drizzle/addon.json +188 -0
- package/templates/orm/drizzle/files/d1/Database.ts +7 -0
- package/templates/orm/drizzle/files/d1/drizzle/20261018154417_init/migration.sql +10 -0
- package/templates/orm/drizzle/files/d1/drizzle/20261018154417_init/snapshot.json +60 -0
- package/templates/orm/drizzle/files/d1/drizzle.config.ts +7 -0
- package/templates/orm/drizzle/files/d1/layer.ts +13 -0
- package/templates/orm/drizzle/files/d1/migrate.ts +37 -0
- package/templates/orm/drizzle/files/d1/schema.ts +15 -0
- package/templates/orm/drizzle/files/pg/Database.ts +7 -0
- package/templates/orm/drizzle/files/pg/drizzle/20261018154416_init/migration.sql +10 -0
- package/templates/orm/drizzle/files/pg/drizzle/20261018154416_init/snapshot.json +75 -0
- package/templates/orm/drizzle/files/pg/drizzle.config.ts +10 -0
- package/templates/orm/drizzle/files/pg/layer.ts +16 -0
- package/templates/orm/drizzle/files/pg/migrate.ts +24 -0
- package/templates/orm/drizzle/files/pg/schema.ts +11 -0
- package/templates/orm/drizzle/files/shared/index.ts +2 -0
- package/templates/orm/drizzle/files/shared/notes.ts +15 -0
- package/templates/orm/drizzle/files/shared/page.tsx +50 -0
- package/templates/orm/effect-sql/addon.json +124 -0
- package/templates/orm/effect-sql/files/d1/layer.ts +13 -0
- package/templates/orm/effect-sql/files/d1/migrate.ts +20 -0
- package/templates/orm/effect-sql/files/d1/schema.ts +7 -0
- package/templates/orm/effect-sql/files/d1-sql/0001_init.sql +10 -0
- package/templates/orm/effect-sql/files/pg/layer.ts +16 -0
- package/templates/orm/effect-sql/files/pg/migrate.ts +66 -0
- package/templates/orm/effect-sql/files/pg/schema.ts +7 -0
- package/templates/orm/effect-sql/files/pg-sql/0001_init.sql +10 -0
- package/templates/orm/effect-sql/files/shared/Database.ts +7 -0
- package/templates/orm/effect-sql/files/shared/index.ts +2 -0
- package/templates/orm/effect-sql/files/shared/notes.ts +18 -0
- package/templates/orm/effect-sql/files/shared/page.tsx +50 -0
- package/templates/runtime/cloudflare/addon.json +52 -0
- package/templates/runtime/cloudflare/files/cloudflare.ts +10 -0
- package/templates/runtime/cloudflare/files/routes.ts +5 -0
- package/templates/runtime/cloudflare/files/server.ts +22 -0
- package/templates/runtime/cloudflare/files/tsconfig.json +12 -0
- package/templates/runtime/cloudflare/files/vite.config.ts +20 -0
- package/templates/runtime/cloudflare/files/wrangler.jsonc +8 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
3
|
+
import type * as React from "react"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
7
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function DropdownMenuPortal({
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
13
|
+
return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function DropdownMenuTrigger({
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
19
|
+
return <DropdownMenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function DropdownMenuContent({
|
|
23
|
+
className,
|
|
24
|
+
sideOffset = 4,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
27
|
+
return (
|
|
28
|
+
<DropdownMenuPrimitive.Portal>
|
|
29
|
+
<DropdownMenuPrimitive.Content
|
|
30
|
+
data-slot="dropdown-menu-content"
|
|
31
|
+
sideOffset={sideOffset}
|
|
32
|
+
className={cn(
|
|
33
|
+
"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
34
|
+
className,
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
</DropdownMenuPrimitive.Portal>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
43
|
+
return <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function DropdownMenuItem({
|
|
47
|
+
className,
|
|
48
|
+
inset,
|
|
49
|
+
variant = "default",
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
52
|
+
inset?: boolean
|
|
53
|
+
variant?: "default" | "destructive"
|
|
54
|
+
}) {
|
|
55
|
+
return (
|
|
56
|
+
<DropdownMenuPrimitive.Item
|
|
57
|
+
data-slot="dropdown-menu-item"
|
|
58
|
+
data-inset={inset}
|
|
59
|
+
data-variant={variant}
|
|
60
|
+
className={cn(
|
|
61
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
62
|
+
className,
|
|
63
|
+
)}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function DropdownMenuCheckboxItem({
|
|
70
|
+
className,
|
|
71
|
+
children,
|
|
72
|
+
checked,
|
|
73
|
+
...props
|
|
74
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
75
|
+
return (
|
|
76
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
77
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
78
|
+
className={cn(
|
|
79
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
80
|
+
className,
|
|
81
|
+
)}
|
|
82
|
+
checked={checked}
|
|
83
|
+
{...props}
|
|
84
|
+
>
|
|
85
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
86
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
87
|
+
<CheckIcon className="size-4" />
|
|
88
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
89
|
+
</span>
|
|
90
|
+
{children}
|
|
91
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function DropdownMenuRadioGroup({
|
|
96
|
+
...props
|
|
97
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
98
|
+
return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function DropdownMenuRadioItem({
|
|
102
|
+
className,
|
|
103
|
+
children,
|
|
104
|
+
...props
|
|
105
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
|
|
106
|
+
return (
|
|
107
|
+
<DropdownMenuPrimitive.RadioItem
|
|
108
|
+
data-slot="dropdown-menu-radio-item"
|
|
109
|
+
className={cn(
|
|
110
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
111
|
+
className,
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
>
|
|
115
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
116
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
117
|
+
<CircleIcon className="size-2 fill-current" />
|
|
118
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
119
|
+
</span>
|
|
120
|
+
{children}
|
|
121
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function DropdownMenuLabel({
|
|
126
|
+
className,
|
|
127
|
+
inset,
|
|
128
|
+
...props
|
|
129
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
130
|
+
inset?: boolean
|
|
131
|
+
}) {
|
|
132
|
+
return (
|
|
133
|
+
<DropdownMenuPrimitive.Label
|
|
134
|
+
data-slot="dropdown-menu-label"
|
|
135
|
+
data-inset={inset}
|
|
136
|
+
className={cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className)}
|
|
137
|
+
{...props}
|
|
138
|
+
/>
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function DropdownMenuSeparator({
|
|
143
|
+
className,
|
|
144
|
+
...props
|
|
145
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
146
|
+
return (
|
|
147
|
+
<DropdownMenuPrimitive.Separator
|
|
148
|
+
data-slot="dropdown-menu-separator"
|
|
149
|
+
className={cn("-mx-1 my-1 h-px bg-border", className)}
|
|
150
|
+
{...props}
|
|
151
|
+
/>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
|
|
156
|
+
return (
|
|
157
|
+
<span
|
|
158
|
+
data-slot="dropdown-menu-shortcut"
|
|
159
|
+
className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)}
|
|
160
|
+
{...props}
|
|
161
|
+
/>
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
166
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function DropdownMenuSubTrigger({
|
|
170
|
+
className,
|
|
171
|
+
inset,
|
|
172
|
+
children,
|
|
173
|
+
...props
|
|
174
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
175
|
+
inset?: boolean
|
|
176
|
+
}) {
|
|
177
|
+
return (
|
|
178
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
179
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
180
|
+
data-inset={inset}
|
|
181
|
+
className={cn(
|
|
182
|
+
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
183
|
+
className,
|
|
184
|
+
)}
|
|
185
|
+
{...props}
|
|
186
|
+
>
|
|
187
|
+
{children}
|
|
188
|
+
<ChevronRightIcon className="ml-auto size-4" />
|
|
189
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function DropdownMenuSubContent({
|
|
194
|
+
className,
|
|
195
|
+
...props
|
|
196
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
197
|
+
return (
|
|
198
|
+
<DropdownMenuPrimitive.SubContent
|
|
199
|
+
data-slot="dropdown-menu-sub-content"
|
|
200
|
+
className={cn(
|
|
201
|
+
"z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
202
|
+
className,
|
|
203
|
+
)}
|
|
204
|
+
{...props}
|
|
205
|
+
/>
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export {
|
|
210
|
+
DropdownMenu,
|
|
211
|
+
DropdownMenuCheckboxItem,
|
|
212
|
+
DropdownMenuContent,
|
|
213
|
+
DropdownMenuGroup,
|
|
214
|
+
DropdownMenuItem,
|
|
215
|
+
DropdownMenuLabel,
|
|
216
|
+
DropdownMenuPortal,
|
|
217
|
+
DropdownMenuRadioGroup,
|
|
218
|
+
DropdownMenuRadioItem,
|
|
219
|
+
DropdownMenuSeparator,
|
|
220
|
+
DropdownMenuShortcut,
|
|
221
|
+
DropdownMenuSub,
|
|
222
|
+
DropdownMenuSubContent,
|
|
223
|
+
DropdownMenuSubTrigger,
|
|
224
|
+
DropdownMenuTrigger,
|
|
225
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as React from "react"
|
|
2
|
+
import { cn } from "@/lib/utils"
|
|
3
|
+
|
|
4
|
+
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
5
|
+
return (
|
|
6
|
+
<input
|
|
7
|
+
type={type}
|
|
8
|
+
data-slot="input"
|
|
9
|
+
className={cn(
|
|
10
|
+
"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
|
|
11
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
12
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { Input }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Label as LabelPrimitive } from "radix-ui"
|
|
2
|
+
import type * as React from "react"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
6
|
+
return (
|
|
7
|
+
<LabelPrimitive.Root
|
|
8
|
+
data-slot="label"
|
|
9
|
+
className={cn(
|
|
10
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
11
|
+
className,
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { Label }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CircleCheckIcon,
|
|
3
|
+
InfoIcon,
|
|
4
|
+
Loader2Icon,
|
|
5
|
+
OctagonXIcon,
|
|
6
|
+
TriangleAlertIcon,
|
|
7
|
+
} from "lucide-react"
|
|
8
|
+
import { Toaster as Sonner, type ToasterProps } from "sonner"
|
|
9
|
+
import { useTheme } from "@/components/theme-provider"
|
|
10
|
+
|
|
11
|
+
/** Sonner themes itself from CSS variables, which React.CSSProperties doesn't declare. */
|
|
12
|
+
interface ToastStyle extends React.CSSProperties {
|
|
13
|
+
"--normal-bg"?: string
|
|
14
|
+
"--normal-text"?: string
|
|
15
|
+
"--normal-border"?: string
|
|
16
|
+
"--border-radius"?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Toaster = ({ ...props }: ToasterProps) => {
|
|
20
|
+
const { theme } = useTheme()
|
|
21
|
+
const style: ToastStyle = {
|
|
22
|
+
"--normal-bg": "var(--popover)",
|
|
23
|
+
"--normal-text": "var(--popover-foreground)",
|
|
24
|
+
"--normal-border": "var(--border)",
|
|
25
|
+
"--border-radius": "var(--radius)",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Sonner
|
|
30
|
+
theme={theme}
|
|
31
|
+
className="toaster group"
|
|
32
|
+
icons={{
|
|
33
|
+
success: <CircleCheckIcon className="size-4" />,
|
|
34
|
+
info: <InfoIcon className="size-4" />,
|
|
35
|
+
warning: <TriangleAlertIcon className="size-4" />,
|
|
36
|
+
error: <OctagonXIcon className="size-4" />,
|
|
37
|
+
loading: <Loader2Icon className="size-4 animate-spin" />,
|
|
38
|
+
}}
|
|
39
|
+
style={style}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { Toaster }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRouter } from "@tanstack/react-router"
|
|
2
|
+
import { routeTree } from "./routeTree.gen"
|
|
3
|
+
|
|
4
|
+
export function getRouter() {
|
|
5
|
+
return createRouter({ routeTree, scrollRestoration: true, defaultPreload: "intent" })
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module "@tanstack/react-router" {
|
|
9
|
+
interface Register {
|
|
10
|
+
router: ReturnType<typeof getRouter>
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createRootRoute, HeadContent, Outlet, Scripts } from "@tanstack/react-router"
|
|
2
|
+
import type { ReactNode } from "react"
|
|
3
|
+
import { ThemeProvider, themeScript } from "@/components/theme-provider"
|
|
4
|
+
import { Toaster } from "@/components/ui/sonner"
|
|
5
|
+
import appCss from "../styles.css?url"
|
|
6
|
+
|
|
7
|
+
export const Route = createRootRoute({
|
|
8
|
+
head: () => ({
|
|
9
|
+
meta: [
|
|
10
|
+
{ charSet: "utf-8" },
|
|
11
|
+
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
|
12
|
+
{ title: "My app" },
|
|
13
|
+
],
|
|
14
|
+
links: [{ rel: "stylesheet", href: appCss }],
|
|
15
|
+
scripts: [{ children: themeScript }],
|
|
16
|
+
}),
|
|
17
|
+
component: RootComponent,
|
|
18
|
+
shellComponent: RootDocument,
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
function RootComponent() {
|
|
22
|
+
return (
|
|
23
|
+
<ThemeProvider>
|
|
24
|
+
<Outlet />
|
|
25
|
+
<Toaster />
|
|
26
|
+
</ThemeProvider>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function RootDocument({ children }: { children: ReactNode }) {
|
|
31
|
+
return (
|
|
32
|
+
<html lang="en" suppressHydrationWarning>
|
|
33
|
+
<head>
|
|
34
|
+
<HeadContent />
|
|
35
|
+
</head>
|
|
36
|
+
<body>
|
|
37
|
+
{children}
|
|
38
|
+
<Scripts />
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router"
|
|
2
|
+
import { Card, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
|
3
|
+
import { widgets } from "@/components/widgets"
|
|
4
|
+
import { getGreeting } from "@/server/greeting"
|
|
5
|
+
|
|
6
|
+
export const Route = createFileRoute("/app/")({
|
|
7
|
+
loader: () => getGreeting(),
|
|
8
|
+
component: Dashboard,
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
function Dashboard() {
|
|
12
|
+
const greeting = Route.useLoaderData()
|
|
13
|
+
return (
|
|
14
|
+
<div className="space-y-6">
|
|
15
|
+
<h1 className="text-2xl font-semibold">Dashboard</h1>
|
|
16
|
+
<Card>
|
|
17
|
+
<CardHeader>
|
|
18
|
+
<CardTitle>{greeting}</CardTitle>
|
|
19
|
+
<CardDescription>
|
|
20
|
+
This text came from a server function running an Effect on the app runtime.
|
|
21
|
+
</CardDescription>
|
|
22
|
+
</CardHeader>
|
|
23
|
+
</Card>
|
|
24
|
+
{widgets}
|
|
25
|
+
</div>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router"
|
|
2
|
+
import { toast } from "sonner"
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
|
5
|
+
import { Input } from "@/components/ui/input"
|
|
6
|
+
import { Label } from "@/components/ui/label"
|
|
7
|
+
|
|
8
|
+
export const Route = createFileRoute("/app/settings")({ component: Settings })
|
|
9
|
+
|
|
10
|
+
function Settings() {
|
|
11
|
+
return (
|
|
12
|
+
<div className="space-y-6">
|
|
13
|
+
<h1 className="text-2xl font-semibold">Settings</h1>
|
|
14
|
+
<Card className="max-w-md">
|
|
15
|
+
<CardHeader>
|
|
16
|
+
<CardTitle>Profile</CardTitle>
|
|
17
|
+
<CardDescription>Placeholder form; wire it to your own server function.</CardDescription>
|
|
18
|
+
</CardHeader>
|
|
19
|
+
<CardContent className="space-y-4">
|
|
20
|
+
<div className="space-y-2">
|
|
21
|
+
<Label htmlFor="name">Name</Label>
|
|
22
|
+
<Input id="name" placeholder="Ada Lovelace" />
|
|
23
|
+
</div>
|
|
24
|
+
<Button onClick={() => toast.success("Saved")}>Save</Button>
|
|
25
|
+
</CardContent>
|
|
26
|
+
</Card>
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createFileRoute, Link, Outlet } from "@tanstack/react-router"
|
|
2
|
+
import { LayoutDashboard, Settings } from "lucide-react"
|
|
3
|
+
import { ThemeToggle } from "@/components/theme-toggle"
|
|
4
|
+
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
|
|
5
|
+
|
|
6
|
+
export const Route = createFileRoute("/app")({ component: AppShell })
|
|
7
|
+
|
|
8
|
+
const nav = [
|
|
9
|
+
{ to: "/app", label: "Dashboard", icon: LayoutDashboard },
|
|
10
|
+
{ to: "/app/settings", label: "Settings", icon: Settings },
|
|
11
|
+
] as const
|
|
12
|
+
|
|
13
|
+
function AppShell() {
|
|
14
|
+
return (
|
|
15
|
+
<div className="grid min-h-screen grid-cols-[14rem_1fr]">
|
|
16
|
+
<aside className="flex flex-col gap-6 border-r bg-muted/40 p-4">
|
|
17
|
+
<Link to="/" className="font-semibold">
|
|
18
|
+
My app
|
|
19
|
+
</Link>
|
|
20
|
+
<nav className="flex flex-col gap-1">
|
|
21
|
+
{nav.map(({ to, label, icon: Icon }) => (
|
|
22
|
+
<Link
|
|
23
|
+
key={to}
|
|
24
|
+
to={to}
|
|
25
|
+
activeOptions={{ exact: true }}
|
|
26
|
+
className="flex items-center gap-2 rounded-md px-3 py-2 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground [&.active]:bg-accent [&.active]:text-accent-foreground"
|
|
27
|
+
>
|
|
28
|
+
<Icon className="size-4" />
|
|
29
|
+
{label}
|
|
30
|
+
</Link>
|
|
31
|
+
))}
|
|
32
|
+
</nav>
|
|
33
|
+
</aside>
|
|
34
|
+
<div className="flex flex-col">
|
|
35
|
+
<header className="flex items-center justify-end gap-2 border-b px-6 py-3">
|
|
36
|
+
<ThemeToggle />
|
|
37
|
+
<Avatar>
|
|
38
|
+
<AvatarFallback>ME</AvatarFallback>
|
|
39
|
+
</Avatar>
|
|
40
|
+
</header>
|
|
41
|
+
<main className="flex-1 p-6">
|
|
42
|
+
<Outlet />
|
|
43
|
+
</main>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createFileRoute, Link } from "@tanstack/react-router"
|
|
2
|
+
import { ThemeToggle } from "@/components/theme-toggle"
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import { Card, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
|
5
|
+
|
|
6
|
+
export const Route = createFileRoute("/")({ component: Landing })
|
|
7
|
+
|
|
8
|
+
const features = [
|
|
9
|
+
{ title: "Effect 4", description: "Typed errors and services, composed with layers." },
|
|
10
|
+
{ title: "TanStack Start", description: "Full-stack React with server functions." },
|
|
11
|
+
{
|
|
12
|
+
title: "Cloudflare Workers",
|
|
13
|
+
description: "Deployed at the edge, configured in wrangler.jsonc.",
|
|
14
|
+
},
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
function Landing() {
|
|
18
|
+
return (
|
|
19
|
+
<div className="flex min-h-screen flex-col">
|
|
20
|
+
<header className="flex items-center justify-between border-b px-6 py-4">
|
|
21
|
+
<span className="font-semibold">My app</span>
|
|
22
|
+
<div className="flex items-center gap-2">
|
|
23
|
+
<ThemeToggle />
|
|
24
|
+
<Button asChild>
|
|
25
|
+
<Link to="/app">Open app</Link>
|
|
26
|
+
</Button>
|
|
27
|
+
</div>
|
|
28
|
+
</header>
|
|
29
|
+
<main className="mx-auto flex w-full max-w-4xl flex-1 flex-col items-center justify-center gap-10 px-6 py-16">
|
|
30
|
+
<div className="space-y-4 text-center">
|
|
31
|
+
<h1 className="text-4xl font-bold tracking-tight sm:text-5xl">Ship your idea</h1>
|
|
32
|
+
<p className="mx-auto max-w-xl text-muted-foreground">
|
|
33
|
+
A fresh Effect + TanStack Start + Cloudflare monorepo. Edit{" "}
|
|
34
|
+
<code className="rounded bg-muted px-1.5 py-0.5 text-sm">apps/web/src/routes</code> to
|
|
35
|
+
make it yours.
|
|
36
|
+
</p>
|
|
37
|
+
</div>
|
|
38
|
+
<div className="grid w-full gap-4 sm:grid-cols-3">
|
|
39
|
+
{features.map((f) => (
|
|
40
|
+
<Card key={f.title}>
|
|
41
|
+
<CardHeader>
|
|
42
|
+
<CardTitle>{f.title}</CardTitle>
|
|
43
|
+
<CardDescription>{f.description}</CardDescription>
|
|
44
|
+
</CardHeader>
|
|
45
|
+
</Card>
|
|
46
|
+
))}
|
|
47
|
+
</div>
|
|
48
|
+
</main>
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createServerFn } from "@tanstack/react-start"
|
|
2
|
+
import { Effect } from "effect"
|
|
3
|
+
import { runtime } from "./runtime"
|
|
4
|
+
|
|
5
|
+
export const getGreeting = createServerFn({ method: "GET" }).handler(() =>
|
|
6
|
+
runtime.runPromise(
|
|
7
|
+
Effect.gen(function* () {
|
|
8
|
+
yield* Effect.log("greeting requested")
|
|
9
|
+
return "Hello from Effect"
|
|
10
|
+
}),
|
|
11
|
+
),
|
|
12
|
+
)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Layer, Logger } from "effect"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The app's Effect layers. `efforge add` appends new layers to this list, so keep the
|
|
5
|
+
* `Layer.mergeAll(...)` call shape.
|
|
6
|
+
*/
|
|
7
|
+
export const AppLayer = Layer.mergeAll(
|
|
8
|
+
Logger.layer([Logger.consolePretty()]),
|
|
9
|
+
/* efforge:layers */
|
|
10
|
+
)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--radius: 0.625rem;
|
|
8
|
+
--background: oklch(1 0 0);
|
|
9
|
+
--foreground: oklch(0.145 0 0);
|
|
10
|
+
--card: oklch(1 0 0);
|
|
11
|
+
--card-foreground: oklch(0.145 0 0);
|
|
12
|
+
--popover: oklch(1 0 0);
|
|
13
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
14
|
+
--primary: oklch(0.205 0 0);
|
|
15
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
16
|
+
--secondary: oklch(0.97 0 0);
|
|
17
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
18
|
+
--muted: oklch(0.97 0 0);
|
|
19
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
20
|
+
--accent: oklch(0.97 0 0);
|
|
21
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
22
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
23
|
+
--border: oklch(0.922 0 0);
|
|
24
|
+
--input: oklch(0.922 0 0);
|
|
25
|
+
--ring: oklch(0.708 0 0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dark {
|
|
29
|
+
--background: oklch(0.145 0 0);
|
|
30
|
+
--foreground: oklch(0.985 0 0);
|
|
31
|
+
--card: oklch(0.205 0 0);
|
|
32
|
+
--card-foreground: oklch(0.985 0 0);
|
|
33
|
+
--popover: oklch(0.205 0 0);
|
|
34
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
35
|
+
--primary: oklch(0.922 0 0);
|
|
36
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
37
|
+
--secondary: oklch(0.269 0 0);
|
|
38
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
39
|
+
--muted: oklch(0.269 0 0);
|
|
40
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
41
|
+
--accent: oklch(0.269 0 0);
|
|
42
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
43
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
44
|
+
--border: oklch(1 0 0 / 10%);
|
|
45
|
+
--input: oklch(1 0 0 / 15%);
|
|
46
|
+
--ring: oklch(0.556 0 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@theme inline {
|
|
50
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
51
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
52
|
+
--radius-lg: var(--radius);
|
|
53
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
54
|
+
--color-background: var(--background);
|
|
55
|
+
--color-foreground: var(--foreground);
|
|
56
|
+
--color-card: var(--card);
|
|
57
|
+
--color-card-foreground: var(--card-foreground);
|
|
58
|
+
--color-popover: var(--popover);
|
|
59
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
60
|
+
--color-primary: var(--primary);
|
|
61
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
62
|
+
--color-secondary: var(--secondary);
|
|
63
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
64
|
+
--color-muted: var(--muted);
|
|
65
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
66
|
+
--color-accent: var(--accent);
|
|
67
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
68
|
+
--color-destructive: var(--destructive);
|
|
69
|
+
--color-border: var(--border);
|
|
70
|
+
--color-input: var(--input);
|
|
71
|
+
--color-ring: var(--ring);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@layer base {
|
|
75
|
+
* {
|
|
76
|
+
@apply border-border outline-ring/50;
|
|
77
|
+
}
|
|
78
|
+
body {
|
|
79
|
+
@apply bg-background text-foreground;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"jsx": "react-jsx",
|
|
5
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
6
|
+
"types": ["vite/client"],
|
|
7
|
+
"noEmit": true,
|
|
8
|
+
"paths": { "@/*": ["./src/*"] }
|
|
9
|
+
},
|
|
10
|
+
"include": ["src", "vite.config.ts"]
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import tailwindcss from "@tailwindcss/vite"
|
|
2
|
+
import { tanstackStart } from "@tanstack/react-start/plugin/vite"
|
|
3
|
+
import viteReact from "@vitejs/plugin-react"
|
|
4
|
+
import { defineConfig } from "vite"
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
resolve: { tsconfigPaths: true },
|
|
8
|
+
plugins: [tanstackStart(), tailwindcss(), viteReact()],
|
|
9
|
+
})
|