create-better-t-stack 2.17.1 → 2.18.1
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/dist/index.js +93 -83
- package/package.json +1 -1
- package/templates/auth/server/base/src/lib/auth.ts.hbs +25 -25
- package/templates/frontend/react/next/package.json.hbs +1 -4
- package/templates/frontend/react/react-router/package.json +1 -4
- package/templates/frontend/react/tanstack-router/package.json +1 -4
- package/templates/frontend/react/tanstack-start/package.json +10 -15
- package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +3 -3
- package/templates/frontend/react/tanstack-start/vite.config.ts +8 -0
- package/templates/frontend/react/web-base/src/components/ui/button.tsx +9 -9
- package/templates/frontend/react/web-base/src/components/ui/card.tsx +10 -10
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +6 -6
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +26 -24
- package/templates/frontend/react/web-base/src/components/ui/input.tsx +4 -4
- package/templates/frontend/react/web-base/src/components/ui/label.tsx +5 -7
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +3 -3
- package/templates/frontend/react/web-base/src/components/ui/sonner.tsx +2 -0
- package/templates/frontend/react/tanstack-start/app.config.ts +0 -17
- package/templates/frontend/react/tanstack-start/src/api.ts +0 -6
- package/templates/frontend/react/tanstack-start/src/client.tsx +0 -8
- package/templates/frontend/react/tanstack-start/src/ssr.tsx +0 -12
package/dist/index.js
CHANGED
|
@@ -46,8 +46,8 @@ const DEFAULT_CONFIG = {
|
|
|
46
46
|
api: "trpc"
|
|
47
47
|
};
|
|
48
48
|
const dependencyVersionMap = {
|
|
49
|
-
"better-auth": "^1.2.
|
|
50
|
-
"@better-auth/expo": "^1.2.
|
|
49
|
+
"better-auth": "^1.2.9",
|
|
50
|
+
"@better-auth/expo": "^1.2.9",
|
|
51
51
|
"drizzle-orm": "^0.38.4",
|
|
52
52
|
"drizzle-kit": "^0.30.5",
|
|
53
53
|
"@libsql/client": "^0.14.0",
|
|
@@ -86,9 +86,9 @@ const dependencyVersionMap = {
|
|
|
86
86
|
"@ai-sdk/svelte": "^2.1.9",
|
|
87
87
|
"@ai-sdk/react": "^1.2.12",
|
|
88
88
|
"@prisma/extension-accelerate": "^1.3.0",
|
|
89
|
-
"@orpc/server": "^1.
|
|
90
|
-
"@orpc/client": "^1.
|
|
91
|
-
"@orpc/tanstack-query": "^1.
|
|
89
|
+
"@orpc/server": "^1.5.0",
|
|
90
|
+
"@orpc/client": "^1.5.0",
|
|
91
|
+
"@orpc/tanstack-query": "^1.5.0",
|
|
92
92
|
"@trpc/tanstack-react-query": "^11.0.0",
|
|
93
93
|
"@trpc/server": "^11.0.0",
|
|
94
94
|
"@trpc/client": "^11.0.0",
|
|
@@ -2894,7 +2894,7 @@ async function getFrontendChoice(frontendOptions, backend) {
|
|
|
2894
2894
|
},
|
|
2895
2895
|
{
|
|
2896
2896
|
value: "tanstack-start",
|
|
2897
|
-
label: "TanStack Start (
|
|
2897
|
+
label: "TanStack Start (devinxi)",
|
|
2898
2898
|
hint: "SSR, Server Functions, API Routes and more with TanStack Router"
|
|
2899
2899
|
}
|
|
2900
2900
|
];
|
|
@@ -3120,70 +3120,6 @@ async function gatherConfig(flags, projectName, projectDir, relativePath) {
|
|
|
3120
3120
|
};
|
|
3121
3121
|
}
|
|
3122
3122
|
|
|
3123
|
-
//#endregion
|
|
3124
|
-
//#region src/prompts/project-name.ts
|
|
3125
|
-
const INVALID_CHARS = [
|
|
3126
|
-
"<",
|
|
3127
|
-
">",
|
|
3128
|
-
":",
|
|
3129
|
-
"\"",
|
|
3130
|
-
"|",
|
|
3131
|
-
"?",
|
|
3132
|
-
"*"
|
|
3133
|
-
];
|
|
3134
|
-
const MAX_LENGTH = 255;
|
|
3135
|
-
function validateDirectoryName(name) {
|
|
3136
|
-
if (name === ".") return void 0;
|
|
3137
|
-
if (!name) return "Project name cannot be empty";
|
|
3138
|
-
if (name.length > MAX_LENGTH) return `Project name must be less than ${MAX_LENGTH} characters`;
|
|
3139
|
-
if (INVALID_CHARS.some((char) => name.includes(char))) return "Project name contains invalid characters";
|
|
3140
|
-
if (name.startsWith(".") || name.startsWith("-")) return "Project name cannot start with a dot or dash";
|
|
3141
|
-
if (name.toLowerCase() === "node_modules") return "Project name is reserved";
|
|
3142
|
-
return void 0;
|
|
3143
|
-
}
|
|
3144
|
-
async function getProjectName(initialName) {
|
|
3145
|
-
if (initialName) {
|
|
3146
|
-
if (initialName === ".") return initialName;
|
|
3147
|
-
const finalDirName = path.basename(initialName);
|
|
3148
|
-
const validationError = validateDirectoryName(finalDirName);
|
|
3149
|
-
if (!validationError) return initialName;
|
|
3150
|
-
}
|
|
3151
|
-
let isValid = false;
|
|
3152
|
-
let projectPath = "";
|
|
3153
|
-
let defaultName = DEFAULT_CONFIG.projectName;
|
|
3154
|
-
let counter = 1;
|
|
3155
|
-
while (fs.pathExistsSync(path.resolve(process.cwd(), defaultName)) && fs.readdirSync(path.resolve(process.cwd(), defaultName)).length > 0) {
|
|
3156
|
-
defaultName = `${DEFAULT_CONFIG.projectName}-${counter}`;
|
|
3157
|
-
counter++;
|
|
3158
|
-
}
|
|
3159
|
-
while (!isValid) {
|
|
3160
|
-
const response = await text({
|
|
3161
|
-
message: "Enter your project name or path (relative to current directory)",
|
|
3162
|
-
placeholder: defaultName,
|
|
3163
|
-
initialValue: initialName,
|
|
3164
|
-
defaultValue: defaultName,
|
|
3165
|
-
validate: (value) => {
|
|
3166
|
-
const nameToUse = value.trim() || defaultName;
|
|
3167
|
-
const finalDirName = path.basename(nameToUse);
|
|
3168
|
-
const validationError = validateDirectoryName(finalDirName);
|
|
3169
|
-
if (validationError) return validationError;
|
|
3170
|
-
if (nameToUse !== ".") {
|
|
3171
|
-
const projectDir = path.resolve(process.cwd(), nameToUse);
|
|
3172
|
-
if (!projectDir.startsWith(process.cwd())) return "Project path must be within current directory";
|
|
3173
|
-
}
|
|
3174
|
-
return void 0;
|
|
3175
|
-
}
|
|
3176
|
-
});
|
|
3177
|
-
if (isCancel(response)) {
|
|
3178
|
-
cancel(pc.red("Operation cancelled."));
|
|
3179
|
-
process.exit(0);
|
|
3180
|
-
}
|
|
3181
|
-
projectPath = response || defaultName;
|
|
3182
|
-
isValid = true;
|
|
3183
|
-
}
|
|
3184
|
-
return projectPath;
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
3123
|
//#endregion
|
|
3188
3124
|
//#region src/types.ts
|
|
3189
3125
|
const DatabaseSchema = z.enum([
|
|
@@ -3257,6 +3193,69 @@ const APISchema = z.enum([
|
|
|
3257
3193
|
"orpc",
|
|
3258
3194
|
"none"
|
|
3259
3195
|
]).describe("API type");
|
|
3196
|
+
const ProjectNameSchema = z.string().min(1, "Project name cannot be empty").max(255, "Project name must be less than 255 characters").refine((name) => name === "." || !name.startsWith("."), "Project name cannot start with a dot (except for '.')").refine((name) => name === "." || !name.startsWith("-"), "Project name cannot start with a dash").refine((name) => {
|
|
3197
|
+
const invalidChars = [
|
|
3198
|
+
"<",
|
|
3199
|
+
">",
|
|
3200
|
+
":",
|
|
3201
|
+
"\"",
|
|
3202
|
+
"|",
|
|
3203
|
+
"?",
|
|
3204
|
+
"*"
|
|
3205
|
+
];
|
|
3206
|
+
return !invalidChars.some((char) => name.includes(char));
|
|
3207
|
+
}, "Project name contains invalid characters").refine((name) => name.toLowerCase() !== "node_modules", "Project name is reserved").describe("Project name or path");
|
|
3208
|
+
|
|
3209
|
+
//#endregion
|
|
3210
|
+
//#region src/prompts/project-name.ts
|
|
3211
|
+
function validateDirectoryName(name) {
|
|
3212
|
+
if (name === ".") return void 0;
|
|
3213
|
+
const result = ProjectNameSchema.safeParse(name);
|
|
3214
|
+
if (!result.success) return result.error.issues[0]?.message || "Invalid project name";
|
|
3215
|
+
return void 0;
|
|
3216
|
+
}
|
|
3217
|
+
async function getProjectName(initialName) {
|
|
3218
|
+
if (initialName) {
|
|
3219
|
+
if (initialName === ".") return initialName;
|
|
3220
|
+
const finalDirName = path.basename(initialName);
|
|
3221
|
+
const validationError = validateDirectoryName(finalDirName);
|
|
3222
|
+
if (!validationError) return initialName;
|
|
3223
|
+
}
|
|
3224
|
+
let isValid = false;
|
|
3225
|
+
let projectPath = "";
|
|
3226
|
+
let defaultName = DEFAULT_CONFIG.projectName;
|
|
3227
|
+
let counter = 1;
|
|
3228
|
+
while (fs.pathExistsSync(path.resolve(process.cwd(), defaultName)) && fs.readdirSync(path.resolve(process.cwd(), defaultName)).length > 0) {
|
|
3229
|
+
defaultName = `${DEFAULT_CONFIG.projectName}-${counter}`;
|
|
3230
|
+
counter++;
|
|
3231
|
+
}
|
|
3232
|
+
while (!isValid) {
|
|
3233
|
+
const response = await text({
|
|
3234
|
+
message: "Enter your project name or path (relative to current directory)",
|
|
3235
|
+
placeholder: defaultName,
|
|
3236
|
+
initialValue: initialName,
|
|
3237
|
+
defaultValue: defaultName,
|
|
3238
|
+
validate: (value) => {
|
|
3239
|
+
const nameToUse = value.trim() || defaultName;
|
|
3240
|
+
const finalDirName = path.basename(nameToUse);
|
|
3241
|
+
const validationError = validateDirectoryName(finalDirName);
|
|
3242
|
+
if (validationError) return validationError;
|
|
3243
|
+
if (nameToUse !== ".") {
|
|
3244
|
+
const projectDir = path.resolve(process.cwd(), nameToUse);
|
|
3245
|
+
if (!projectDir.startsWith(process.cwd())) return "Project path must be within current directory";
|
|
3246
|
+
}
|
|
3247
|
+
return void 0;
|
|
3248
|
+
}
|
|
3249
|
+
});
|
|
3250
|
+
if (isCancel(response)) {
|
|
3251
|
+
cancel(pc.red("Operation cancelled."));
|
|
3252
|
+
process.exit(0);
|
|
3253
|
+
}
|
|
3254
|
+
projectPath = response || defaultName;
|
|
3255
|
+
isValid = true;
|
|
3256
|
+
}
|
|
3257
|
+
return projectPath;
|
|
3258
|
+
}
|
|
3260
3259
|
|
|
3261
3260
|
//#endregion
|
|
3262
3261
|
//#region src/utils/get-latest-cli-version.ts
|
|
@@ -3442,8 +3441,22 @@ function processAndValidateFlags(options, providedFlags, projectName) {
|
|
|
3442
3441
|
if (options.runtime) config.runtime = options.runtime;
|
|
3443
3442
|
if (options.dbSetup) config.dbSetup = options.dbSetup;
|
|
3444
3443
|
if (options.packageManager) config.packageManager = options.packageManager;
|
|
3445
|
-
if (projectName)
|
|
3446
|
-
|
|
3444
|
+
if (projectName) {
|
|
3445
|
+
const result = ProjectNameSchema.safeParse(path.basename(projectName));
|
|
3446
|
+
if (!result.success) {
|
|
3447
|
+
consola$1.fatal(`Invalid project name: ${result.error.issues[0]?.message || "Invalid project name"}`);
|
|
3448
|
+
process.exit(1);
|
|
3449
|
+
}
|
|
3450
|
+
config.projectName = projectName;
|
|
3451
|
+
} else if (options.projectDirectory) {
|
|
3452
|
+
const baseName = path.basename(path.resolve(process.cwd(), options.projectDirectory));
|
|
3453
|
+
const result = ProjectNameSchema.safeParse(baseName);
|
|
3454
|
+
if (!result.success) {
|
|
3455
|
+
consola$1.fatal(`Invalid project name: ${result.error.issues[0]?.message || "Invalid project name"}`);
|
|
3456
|
+
process.exit(1);
|
|
3457
|
+
}
|
|
3458
|
+
config.projectName = baseName;
|
|
3459
|
+
}
|
|
3447
3460
|
if (options.frontend && options.frontend.length > 0) if (options.frontend.includes("none")) {
|
|
3448
3461
|
if (options.frontend.length > 1) {
|
|
3449
3462
|
consola$1.fatal(`Cannot combine 'none' with other frontend options.`);
|
|
@@ -3587,9 +3600,6 @@ function getProvidedFlags(options) {
|
|
|
3587
3600
|
|
|
3588
3601
|
//#endregion
|
|
3589
3602
|
//#region src/index.ts
|
|
3590
|
-
const exit = () => process.exit(0);
|
|
3591
|
-
process.on("SIGINT", exit);
|
|
3592
|
-
process.on("SIGTERM", exit);
|
|
3593
3603
|
const t = trpcServer.initTRPC.create();
|
|
3594
3604
|
async function handleDirectoryConflict(currentPathInput) {
|
|
3595
3605
|
while (true) {
|
|
@@ -3739,17 +3749,17 @@ async function createProjectHandler(input) {
|
|
|
3739
3749
|
const router = t.router({ init: t.procedure.meta({
|
|
3740
3750
|
description: "Create a new Better-T Stack project",
|
|
3741
3751
|
default: true
|
|
3742
|
-
}).input(zod.tuple([
|
|
3743
|
-
yes: zod.boolean().optional().default(false).describe("Use default configuration
|
|
3752
|
+
}).input(zod.tuple([ProjectNameSchema.optional(), zod.object({
|
|
3753
|
+
yes: zod.boolean().optional().default(false).describe("Use default configuration"),
|
|
3744
3754
|
database: DatabaseSchema.optional(),
|
|
3745
3755
|
orm: ORMSchema.optional(),
|
|
3746
|
-
auth: zod.boolean().optional()
|
|
3747
|
-
frontend: zod.array(FrontendSchema).optional()
|
|
3748
|
-
addons: zod.array(AddonsSchema).optional()
|
|
3749
|
-
examples: zod.array(ExamplesSchema).optional()
|
|
3750
|
-
git: zod.boolean().optional()
|
|
3756
|
+
auth: zod.boolean().optional(),
|
|
3757
|
+
frontend: zod.array(FrontendSchema).optional(),
|
|
3758
|
+
addons: zod.array(AddonsSchema).optional(),
|
|
3759
|
+
examples: zod.array(ExamplesSchema).optional(),
|
|
3760
|
+
git: zod.boolean().optional(),
|
|
3751
3761
|
packageManager: PackageManagerSchema.optional(),
|
|
3752
|
-
install: zod.boolean().optional()
|
|
3762
|
+
install: zod.boolean().optional(),
|
|
3753
3763
|
dbSetup: DatabaseSetupSchema.optional(),
|
|
3754
3764
|
backend: BackendSchema.optional(),
|
|
3755
3765
|
runtime: RuntimeSchema.optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.1",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{#if (eq orm "prisma")}}
|
|
2
2
|
import { betterAuth } from "better-auth";
|
|
3
3
|
import { prismaAdapter } from "better-auth/adapters/prisma";
|
|
4
|
-
{{#if (includes frontend "native")}}
|
|
4
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
5
5
|
import { expo } from "@better-auth/expo";
|
|
6
6
|
{{/if}}
|
|
7
7
|
import prisma from "../../prisma";
|
|
@@ -14,24 +14,24 @@ export const auth = betterAuth({
|
|
|
14
14
|
{{#if (eq database "mongodb")}}provider: "mongodb"{{/if}}
|
|
15
15
|
}),
|
|
16
16
|
trustedOrigins: [
|
|
17
|
-
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
|
|
17
|
+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
18
18
|
"my-better-t-app://",{{/if}}
|
|
19
19
|
],
|
|
20
20
|
emailAndPassword: {
|
|
21
21
|
enabled: true,
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
{{
|
|
24
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
25
25
|
,
|
|
26
26
|
plugins: [expo()]
|
|
27
|
-
{{/if
|
|
27
|
+
{{/if}}
|
|
28
28
|
});
|
|
29
29
|
{{/if}}
|
|
30
30
|
|
|
31
31
|
{{#if (eq orm "drizzle")}}
|
|
32
32
|
import { betterAuth } from "better-auth";
|
|
33
33
|
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
34
|
-
{{#if (includes frontend "native")}}
|
|
34
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
35
35
|
import { expo } from "@better-auth/expo";
|
|
36
36
|
{{/if}}
|
|
37
37
|
import { db } from "../db";
|
|
@@ -45,64 +45,64 @@ export const auth = betterAuth({
|
|
|
45
45
|
schema: schema,
|
|
46
46
|
}),
|
|
47
47
|
trustedOrigins: [
|
|
48
|
-
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
|
|
48
|
+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
49
49
|
"my-better-t-app://",{{/if}}
|
|
50
50
|
],
|
|
51
51
|
emailAndPassword: {
|
|
52
52
|
enabled: true,
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
{{
|
|
55
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
56
56
|
,
|
|
57
57
|
plugins: [expo()]
|
|
58
|
-
{{/if
|
|
58
|
+
{{/if}}
|
|
59
59
|
});
|
|
60
60
|
{{/if}}
|
|
61
61
|
|
|
62
62
|
{{#if (eq orm "mongoose")}}
|
|
63
63
|
import { betterAuth } from "better-auth";
|
|
64
64
|
import { mongodbAdapter } from "better-auth/adapters/mongodb";
|
|
65
|
-
{{#if (includes frontend "native")}}
|
|
65
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
66
66
|
import { expo } from "@better-auth/expo";
|
|
67
67
|
{{/if}}
|
|
68
68
|
import { client } from "../db";
|
|
69
69
|
|
|
70
70
|
export const auth = betterAuth({
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
database: mongodbAdapter(client),
|
|
72
|
+
trustedOrigins: [
|
|
73
|
+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
74
|
+
"my-better-t-app://",{{/if}}
|
|
75
|
+
],
|
|
76
|
+
emailAndPassword: {
|
|
77
|
+
enabled: true,
|
|
78
|
+
}
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
81
|
+
,
|
|
82
|
+
plugins: [expo()]
|
|
83
|
+
{{/if}}
|
|
84
84
|
});
|
|
85
85
|
{{/if}}
|
|
86
86
|
|
|
87
87
|
{{#if (eq orm "none")}}
|
|
88
88
|
import { betterAuth } from "better-auth";
|
|
89
|
-
{{#if (includes frontend "native")}}
|
|
89
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
90
90
|
import { expo } from "@better-auth/expo";
|
|
91
91
|
{{/if}}
|
|
92
92
|
|
|
93
93
|
export const auth = betterAuth({
|
|
94
94
|
database: "", // Invalid configuration
|
|
95
95
|
trustedOrigins: [
|
|
96
|
-
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
|
|
96
|
+
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
97
97
|
"my-better-t-app://",{{/if}}
|
|
98
98
|
],
|
|
99
99
|
emailAndPassword: {
|
|
100
100
|
enabled: true,
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
{{
|
|
103
|
+
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
104
104
|
,
|
|
105
105
|
plugins: [expo()]
|
|
106
|
-
{{/if
|
|
106
|
+
{{/if}}
|
|
107
107
|
});
|
|
108
108
|
{{/if}}
|
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
"lint": "next lint"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"
|
|
13
|
-
"@radix-ui/react-dropdown-menu": "^2.1.7",
|
|
14
|
-
"@radix-ui/react-label": "^2.1.3",
|
|
15
|
-
"@radix-ui/react-slot": "^1.2.0",
|
|
12
|
+
"radix-ui": "^1.4.2",
|
|
16
13
|
"@tanstack/react-form": "^1.3.2",
|
|
17
14
|
"class-variance-authority": "^0.7.1",
|
|
18
15
|
"clsx": "^2.1.1",
|
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
"typecheck": "react-router typegen && tsc"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"
|
|
13
|
-
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
14
|
-
"@radix-ui/react-label": "^2.1.7",
|
|
15
|
-
"@radix-ui/react-slot": "^1.2.3",
|
|
12
|
+
"radix-ui": "^1.4.2",
|
|
16
13
|
"@react-router/fs-routes": "^7.6.1",
|
|
17
14
|
"@react-router/node": "^7.6.1",
|
|
18
15
|
"@react-router/serve": "^7.6.1",
|
|
@@ -23,10 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@hookform/resolvers": "^3.10.0",
|
|
26
|
-
|
|
27
|
-
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
28
|
-
"@radix-ui/react-label": "^2.1.2",
|
|
29
|
-
"@radix-ui/react-slot": "^1.1.2",
|
|
26
|
+
"radix-ui": "^1.4.2",
|
|
30
27
|
"@tanstack/react-form": "^1.0.5",
|
|
31
28
|
"@tailwindcss/vite": "^4.0.15",
|
|
32
29
|
"@tanstack/react-router": "^1.114.25",
|
|
@@ -3,23 +3,19 @@
|
|
|
3
3
|
"private": true,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"build": "vinxi build",
|
|
6
|
+
"build": "vite build",
|
|
8
7
|
"serve": "vite preview",
|
|
9
|
-
"dev": "
|
|
8
|
+
"dev": "vite dev --port=3001"
|
|
10
9
|
},
|
|
11
10
|
"dependencies": {
|
|
12
|
-
"
|
|
13
|
-
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
14
|
-
"@radix-ui/react-label": "^2.1.2",
|
|
15
|
-
"@radix-ui/react-slot": "^1.1.2",
|
|
11
|
+
"radix-ui": "^1.4.2",
|
|
16
12
|
"@tanstack/react-form": "^1.0.5",
|
|
17
13
|
"@tailwindcss/vite": "^4.1.8",
|
|
18
|
-
"@tanstack/react-query": "^5.80.
|
|
19
|
-
"@tanstack/react-router": "^1.
|
|
20
|
-
"@tanstack/react-router-with-query": "^1.
|
|
21
|
-
"@tanstack/react-start": "^1.
|
|
22
|
-
"@tanstack/router-plugin": "^1.
|
|
14
|
+
"@tanstack/react-query": "^5.80.6",
|
|
15
|
+
"@tanstack/react-router": "^1.121.0-alpha.27",
|
|
16
|
+
"@tanstack/react-router-with-query": "^1.121.0",
|
|
17
|
+
"@tanstack/react-start": "^1.121.0-alpha.27",
|
|
18
|
+
"@tanstack/router-plugin": "^1.121.0",
|
|
23
19
|
"class-variance-authority": "^0.7.1",
|
|
24
20
|
"clsx": "^2.1.1",
|
|
25
21
|
"lucide-react": "^0.473.0",
|
|
@@ -30,17 +26,16 @@
|
|
|
30
26
|
"tailwindcss": "^4.1.3",
|
|
31
27
|
"tailwind-merge": "^2.6.0",
|
|
32
28
|
"tw-animate-css": "^1.2.5",
|
|
33
|
-
"vinxi": "^0.5.3",
|
|
34
29
|
"vite-tsconfig-paths": "^5.1.4",
|
|
35
30
|
"zod": "^3.25.16"
|
|
36
31
|
},
|
|
37
32
|
"devDependencies": {
|
|
38
|
-
"@tanstack/react-router-devtools": "^1.
|
|
33
|
+
"@tanstack/react-router-devtools": "^1.121.0-alpha.27",
|
|
39
34
|
"@testing-library/dom": "^10.4.0",
|
|
40
35
|
"@testing-library/react": "^16.2.0",
|
|
41
36
|
"@types/react": "^19.0.12",
|
|
42
37
|
"@types/react-dom": "^19.0.4",
|
|
43
|
-
"@vitejs/plugin-react": "^4.
|
|
38
|
+
"@vitejs/plugin-react": "^4.5.2",
|
|
44
39
|
"jsdom": "^26.0.0",
|
|
45
40
|
"typescript": "^5.7.2",
|
|
46
41
|
"vite": "^6.3.5",
|
|
@@ -8,7 +8,7 @@ import { routeTree } from "./routeTree.gen";
|
|
|
8
8
|
import Loader from "./components/loader";
|
|
9
9
|
import "./index.css";
|
|
10
10
|
{{else}}
|
|
11
|
-
import { createRouter as
|
|
11
|
+
import { createRouter as createTanStackRouter } from "@tanstack/react-router";
|
|
12
12
|
import Loader from "./components/loader";
|
|
13
13
|
import "./index.css";
|
|
14
14
|
import { routeTree } from "./routeTree.gen";
|
|
@@ -102,7 +102,7 @@ const trpc = createTRPCOptionsProxy({
|
|
|
102
102
|
{{/if}}
|
|
103
103
|
|
|
104
104
|
export const createRouter = () => {
|
|
105
|
-
const router =
|
|
105
|
+
const router = createTanStackRouter({
|
|
106
106
|
routeTree,
|
|
107
107
|
scrollRestoration: true,
|
|
108
108
|
defaultPreloadStaleTime: 0,
|
|
@@ -111,7 +111,7 @@ export const createRouter = () => {
|
|
|
111
111
|
{{else if (eq api "orpc")}}
|
|
112
112
|
context: { orpc, queryClient },
|
|
113
113
|
{{else}}
|
|
114
|
-
context: {
|
|
114
|
+
context: {},
|
|
115
115
|
{{/if}}
|
|
116
116
|
defaultPendingComponent: () => <Loader />,
|
|
117
117
|
defaultNotFoundComponent: () => <div>Not Found</div>,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import tsconfigPaths from "vite-tsconfig-paths";
|
|
3
|
+
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
4
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [tsconfigPaths(), tailwindcss(), tanstackStart({})],
|
|
8
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot } from "
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Slot as SlotPrimitive } from "radix-ui"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
4
|
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
8
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
@@ -33,7 +33,7 @@ const buttonVariants = cva(
|
|
|
33
33
|
size: "default",
|
|
34
34
|
},
|
|
35
35
|
}
|
|
36
|
-
)
|
|
36
|
+
)
|
|
37
37
|
|
|
38
38
|
function Button({
|
|
39
39
|
className,
|
|
@@ -43,9 +43,9 @@ function Button({
|
|
|
43
43
|
...props
|
|
44
44
|
}: React.ComponentProps<"button"> &
|
|
45
45
|
VariantProps<typeof buttonVariants> & {
|
|
46
|
-
asChild?: boolean
|
|
46
|
+
asChild?: boolean
|
|
47
47
|
}) {
|
|
48
|
-
const Comp = asChild ? Slot : "button"
|
|
48
|
+
const Comp = asChild ? SlotPrimitive.Slot : "button"
|
|
49
49
|
|
|
50
50
|
return (
|
|
51
51
|
<Comp
|
|
@@ -53,7 +53,7 @@ function Button({
|
|
|
53
53
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
54
54
|
{...props}
|
|
55
55
|
/>
|
|
56
|
-
)
|
|
56
|
+
)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export { Button, buttonVariants }
|
|
59
|
+
export { Button, buttonVariants }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react"
|
|
1
|
+
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
4
|
|
|
5
5
|
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
6
|
return (
|
|
@@ -12,7 +12,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
12
12
|
)}
|
|
13
13
|
{...props}
|
|
14
14
|
/>
|
|
15
|
-
)
|
|
15
|
+
)
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -25,7 +25,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
25
25
|
)}
|
|
26
26
|
{...props}
|
|
27
27
|
/>
|
|
28
|
-
)
|
|
28
|
+
)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -35,7 +35,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
35
35
|
className={cn("leading-none font-semibold", className)}
|
|
36
36
|
{...props}
|
|
37
37
|
/>
|
|
38
|
-
)
|
|
38
|
+
)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -45,7 +45,7 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
45
45
|
className={cn("text-muted-foreground text-sm", className)}
|
|
46
46
|
{...props}
|
|
47
47
|
/>
|
|
48
|
-
)
|
|
48
|
+
)
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -58,7 +58,7 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
58
58
|
)}
|
|
59
59
|
{...props}
|
|
60
60
|
/>
|
|
61
|
-
)
|
|
61
|
+
)
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -68,7 +68,7 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
68
68
|
className={cn("px-6", className)}
|
|
69
69
|
{...props}
|
|
70
70
|
/>
|
|
71
|
-
)
|
|
71
|
+
)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -78,7 +78,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
78
78
|
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
79
79
|
{...props}
|
|
80
80
|
/>
|
|
81
|
-
)
|
|
81
|
+
)
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export {
|
|
@@ -89,4 +89,4 @@ export {
|
|
|
89
89
|
CardAction,
|
|
90
90
|
CardDescription,
|
|
91
91
|
CardContent,
|
|
92
|
-
}
|
|
92
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import
|
|
3
|
-
import { CheckIcon } from "lucide-react"
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui"
|
|
3
|
+
import { CheckIcon } from "lucide-react"
|
|
4
4
|
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
function Checkbox({
|
|
8
8
|
className,
|
|
@@ -24,7 +24,7 @@ function Checkbox({
|
|
|
24
24
|
<CheckIcon className="size-3.5" />
|
|
25
25
|
</CheckboxPrimitive.Indicator>
|
|
26
26
|
</CheckboxPrimitive.Root>
|
|
27
|
-
)
|
|
27
|
+
)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export { Checkbox }
|
|
30
|
+
export { Checkbox }
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
1
|
+
"use client"
|
|
4
2
|
|
|
5
|
-
import
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
5
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
6
8
|
|
|
7
9
|
function DropdownMenu({
|
|
8
10
|
...props
|
|
9
11
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
10
|
-
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props}
|
|
12
|
+
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
function DropdownMenuPortal({
|
|
@@ -15,7 +17,7 @@ function DropdownMenuPortal({
|
|
|
15
17
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
16
18
|
return (
|
|
17
19
|
<DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
18
|
-
)
|
|
20
|
+
)
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
function DropdownMenuTrigger({
|
|
@@ -26,7 +28,7 @@ function DropdownMenuTrigger({
|
|
|
26
28
|
data-slot="dropdown-menu-trigger"
|
|
27
29
|
{...props}
|
|
28
30
|
/>
|
|
29
|
-
)
|
|
31
|
+
)
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
function DropdownMenuContent({
|
|
@@ -46,7 +48,7 @@ function DropdownMenuContent({
|
|
|
46
48
|
{...props}
|
|
47
49
|
/>
|
|
48
50
|
</DropdownMenuPrimitive.Portal>
|
|
49
|
-
)
|
|
51
|
+
)
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
function DropdownMenuGroup({
|
|
@@ -54,7 +56,7 @@ function DropdownMenuGroup({
|
|
|
54
56
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
55
57
|
return (
|
|
56
58
|
<DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
57
|
-
)
|
|
59
|
+
)
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
function DropdownMenuItem({
|
|
@@ -63,8 +65,8 @@ function DropdownMenuItem({
|
|
|
63
65
|
variant = "default",
|
|
64
66
|
...props
|
|
65
67
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
66
|
-
inset?: boolean
|
|
67
|
-
variant?: "default" | "destructive"
|
|
68
|
+
inset?: boolean
|
|
69
|
+
variant?: "default" | "destructive"
|
|
68
70
|
}) {
|
|
69
71
|
return (
|
|
70
72
|
<DropdownMenuPrimitive.Item
|
|
@@ -77,7 +79,7 @@ function DropdownMenuItem({
|
|
|
77
79
|
)}
|
|
78
80
|
{...props}
|
|
79
81
|
/>
|
|
80
|
-
)
|
|
82
|
+
)
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
function DropdownMenuCheckboxItem({
|
|
@@ -103,7 +105,7 @@ function DropdownMenuCheckboxItem({
|
|
|
103
105
|
</span>
|
|
104
106
|
{children}
|
|
105
107
|
</DropdownMenuPrimitive.CheckboxItem>
|
|
106
|
-
)
|
|
108
|
+
)
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
function DropdownMenuRadioGroup({
|
|
@@ -114,7 +116,7 @@ function DropdownMenuRadioGroup({
|
|
|
114
116
|
data-slot="dropdown-menu-radio-group"
|
|
115
117
|
{...props}
|
|
116
118
|
/>
|
|
117
|
-
)
|
|
119
|
+
)
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
function DropdownMenuRadioItem({
|
|
@@ -138,7 +140,7 @@ function DropdownMenuRadioItem({
|
|
|
138
140
|
</span>
|
|
139
141
|
{children}
|
|
140
142
|
</DropdownMenuPrimitive.RadioItem>
|
|
141
|
-
)
|
|
143
|
+
)
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
function DropdownMenuLabel({
|
|
@@ -146,7 +148,7 @@ function DropdownMenuLabel({
|
|
|
146
148
|
inset,
|
|
147
149
|
...props
|
|
148
150
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
149
|
-
inset?: boolean
|
|
151
|
+
inset?: boolean
|
|
150
152
|
}) {
|
|
151
153
|
return (
|
|
152
154
|
<DropdownMenuPrimitive.Label
|
|
@@ -158,7 +160,7 @@ function DropdownMenuLabel({
|
|
|
158
160
|
)}
|
|
159
161
|
{...props}
|
|
160
162
|
/>
|
|
161
|
-
)
|
|
163
|
+
)
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
function DropdownMenuSeparator({
|
|
@@ -171,7 +173,7 @@ function DropdownMenuSeparator({
|
|
|
171
173
|
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
172
174
|
{...props}
|
|
173
175
|
/>
|
|
174
|
-
)
|
|
176
|
+
)
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
function DropdownMenuShortcut({
|
|
@@ -187,13 +189,13 @@ function DropdownMenuShortcut({
|
|
|
187
189
|
)}
|
|
188
190
|
{...props}
|
|
189
191
|
/>
|
|
190
|
-
)
|
|
192
|
+
)
|
|
191
193
|
}
|
|
192
194
|
|
|
193
195
|
function DropdownMenuSub({
|
|
194
196
|
...props
|
|
195
197
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
196
|
-
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props}
|
|
198
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
function DropdownMenuSubTrigger({
|
|
@@ -202,7 +204,7 @@ function DropdownMenuSubTrigger({
|
|
|
202
204
|
children,
|
|
203
205
|
...props
|
|
204
206
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
205
|
-
inset?: boolean
|
|
207
|
+
inset?: boolean
|
|
206
208
|
}) {
|
|
207
209
|
return (
|
|
208
210
|
<DropdownMenuPrimitive.SubTrigger
|
|
@@ -217,7 +219,7 @@ function DropdownMenuSubTrigger({
|
|
|
217
219
|
{children}
|
|
218
220
|
<ChevronRightIcon className="ml-auto size-4" />
|
|
219
221
|
</DropdownMenuPrimitive.SubTrigger>
|
|
220
|
-
)
|
|
222
|
+
)
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
function DropdownMenuSubContent({
|
|
@@ -233,7 +235,7 @@ function DropdownMenuSubContent({
|
|
|
233
235
|
)}
|
|
234
236
|
{...props}
|
|
235
237
|
/>
|
|
236
|
-
)
|
|
238
|
+
)
|
|
237
239
|
}
|
|
238
240
|
|
|
239
241
|
export {
|
|
@@ -252,4 +254,4 @@ export {
|
|
|
252
254
|
DropdownMenuSub,
|
|
253
255
|
DropdownMenuSubTrigger,
|
|
254
256
|
DropdownMenuSubContent,
|
|
255
|
-
}
|
|
257
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react"
|
|
1
|
+
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
4
|
|
|
5
5
|
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
6
|
return (
|
|
@@ -15,7 +15,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
17
17
|
/>
|
|
18
|
-
)
|
|
18
|
+
)
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export { Input }
|
|
21
|
+
export { Input }
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Label as LabelPrimitive } from "radix-ui"
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
7
5
|
|
|
8
6
|
function Label({
|
|
9
7
|
className,
|
|
@@ -18,7 +16,7 @@ function Label({
|
|
|
18
16
|
)}
|
|
19
17
|
{...props}
|
|
20
18
|
/>
|
|
21
|
-
)
|
|
19
|
+
)
|
|
22
20
|
}
|
|
23
21
|
|
|
24
|
-
export { Label }
|
|
22
|
+
export { Label }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "@/lib/utils"
|
|
1
|
+
import { cn } from "@/lib/utils"
|
|
2
2
|
|
|
3
3
|
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
4
|
return (
|
|
@@ -7,7 +7,7 @@ function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
7
7
|
className={cn("bg-accent animate-pulse rounded-md", className)}
|
|
8
8
|
{...props}
|
|
9
9
|
/>
|
|
10
|
-
)
|
|
10
|
+
)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export { Skeleton }
|
|
13
|
+
export { Skeleton }
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@tanstack/react-start/config";
|
|
2
|
-
import viteTsConfigPaths from "vite-tsconfig-paths";
|
|
3
|
-
import tailwindcss from "@tailwindcss/vite";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
tsr: {
|
|
7
|
-
appDirectory: "src",
|
|
8
|
-
},
|
|
9
|
-
vite: {
|
|
10
|
-
plugins: [
|
|
11
|
-
viteTsConfigPaths({
|
|
12
|
-
projects: ["./tsconfig.json"],
|
|
13
|
-
}),
|
|
14
|
-
tailwindcss(),
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { getRouterManifest } from "@tanstack/react-start/router-manifest";
|
|
2
|
-
import {
|
|
3
|
-
createStartHandler,
|
|
4
|
-
defaultStreamHandler,
|
|
5
|
-
} from "@tanstack/react-start/server";
|
|
6
|
-
|
|
7
|
-
import { createRouter } from "./router";
|
|
8
|
-
|
|
9
|
-
export default createStartHandler({
|
|
10
|
-
createRouter,
|
|
11
|
-
getRouterManifest,
|
|
12
|
-
})(defaultStreamHandler);
|