better-ts-stack 1.0.8 → 1.1.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/builder/configGenerator.d.ts.map +1 -1
- package/dist/builder/configGenerator.js +4 -1
- package/dist/builder/configGenerator.js.map +1 -1
- package/dist/builder/moduleSelector.d.ts.map +1 -1
- package/dist/builder/moduleSelector.js +1 -1
- package/dist/builder/moduleSelector.js.map +1 -1
- package/dist/builder/templateContext.d.ts +1 -1
- package/dist/builder/templateContext.d.ts.map +1 -1
- package/dist/builder/templateContext.js +1 -1
- package/dist/builder/templateContext.js.map +1 -1
- package/dist/prompts/stack.d.ts.map +1 -1
- package/dist/prompts/stack.js +16 -11
- package/dist/prompts/stack.js.map +1 -1
- package/dist/types/index.d.ts +8 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/frontend/tanstack/components.json +18 -0
- package/templates/frontend/tanstack/config.json +49 -0
- package/templates/frontend/tanstack/eslint.config.mjs +23 -0
- package/templates/frontend/tanstack/gitignore +38 -0
- package/templates/frontend/tanstack/public/favicon.svg +7 -0
- package/templates/frontend/tanstack/src/components/ui/button.tsx +51 -0
- package/templates/frontend/tanstack/src/components/ui/card.tsx +60 -0
- package/templates/frontend/tanstack/src/components/ui/field.tsx +67 -0
- package/templates/frontend/tanstack/src/components/ui/input.tsx +18 -0
- package/templates/frontend/tanstack/src/lib/utils.ts +6 -0
- package/templates/frontend/tanstack/src/routeTree.gen.ts +68 -0
- package/templates/frontend/tanstack/src/router.tsx +32 -0
- package/templates/frontend/tanstack/src/routes/__root.tsx +70 -0
- package/templates/frontend/tanstack/src/routes/index.tsx.hbs +102 -0
- package/templates/frontend/tanstack/src/styles/app.css +85 -0
- package/templates/frontend/tanstack/tsconfig.json +22 -0
- package/templates/frontend/tanstack/vite.config.ts +14 -0
- package/templates/modules/auth/tanstack/config.json +33 -0
- package/templates/modules/auth/tanstack/src/components/auth/sign-in-form.tsx +135 -0
- package/templates/modules/auth/tanstack/src/components/auth/sign-out-button.tsx +49 -0
- package/templates/modules/auth/tanstack/src/components/auth/sign-up-form.tsx +153 -0
- package/templates/modules/auth/tanstack/src/lib/auth-client.ts +3 -0
- package/templates/modules/auth/tanstack/src/lib/auth-functions.ts +12 -0
- package/templates/modules/auth/tanstack/src/lib/auth-schema.ts +39 -0
- package/templates/modules/auth/tanstack/src/lib/auth.ts.hbs +38 -0
- package/templates/modules/auth/tanstack/src/routeTree.gen.ts +140 -0
- package/templates/modules/auth/tanstack/src/routes/api/auth/$.ts +16 -0
- package/templates/modules/auth/tanstack/src/routes/dashboard.tsx +111 -0
- package/templates/modules/auth/tanstack/src/routes/sign-in.tsx +37 -0
- package/templates/modules/auth/tanstack/src/routes/sign-up.tsx +37 -0
- package/templates/modules/docker/Dockerfile.hbs +125 -80
- package/templates/modules/drizzle/tanstack/config.json +26 -0
- package/templates/modules/drizzle/tanstack/drizzle.config.ts +13 -0
- package/templates/modules/drizzle/tanstack/src/lib/db.ts +13 -0
- package/templates/modules/drizzle/tanstack/src/lib/schema.ts.hbs +84 -0
- package/templates/modules/prisma/express/config.json +1 -0
- package/templates/modules/prisma/nextjs/config.json +1 -0
- package/templates/modules/prisma/tanstack/config.json +29 -0
- package/templates/modules/prisma/tanstack/prisma/schema.prisma.hbs +91 -0
- package/templates/modules/prisma/tanstack/prisma.config.ts +12 -0
- package/templates/modules/prisma/tanstack/src/lib/prisma.ts +18 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configGenerator.d.ts","sourceRoot":"","sources":["../../src/builder/configGenerator.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,eAAe,EAChB,MAAM,UAAU,CAAC;AAGlB,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,OAAO,EAAE,eAAe,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBxB;AAGD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,EAAE,EACvB,OAAO,EAAE,eAAe,GACvB,YAAY,CAuBd;AAGD,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"configGenerator.d.ts","sourceRoot":"","sources":["../../src/builder/configGenerator.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,eAAe,EAChB,MAAM,UAAU,CAAC;AAGlB,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,OAAO,EAAE,eAAe,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBxB;AAGD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,EAAE,EACvB,OAAO,EAAE,eAAe,GACvB,YAAY,CAuBd;AAGD,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,CA4Cf;AAGD,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
|
@@ -62,10 +62,13 @@ async function generatePackageJson(targetDir, mergedConfig, config) {
|
|
|
62
62
|
private: true,
|
|
63
63
|
engines: { node: ">=24.0.0" },
|
|
64
64
|
description: `Project created with better-ts-stack using ${config.database !== "none" ? config.database : "no database"}`,
|
|
65
|
+
...(config.framework === "tanstack" ? { type: "module" } : {}),
|
|
65
66
|
...(isFullstack ? {} : { main: "dist/index.js" }),
|
|
66
67
|
scripts: mergedConfig.scripts,
|
|
67
68
|
keywords: isFullstack
|
|
68
|
-
?
|
|
69
|
+
? config.framework === "tanstack"
|
|
70
|
+
? ["tanstack-start", "react", "typescript"]
|
|
71
|
+
: ["nextjs", "react", "typescript"]
|
|
69
72
|
: ["backend", "typescript", "express"],
|
|
70
73
|
author: "",
|
|
71
74
|
license: "MIT",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configGenerator.js","sourceRoot":"","sources":["../../src/builder/configGenerator.ts"],"names":[],"mappings":";;;;;AAeA,wDAsBC;AAGD,kDA0BC;AAGD,
|
|
1
|
+
{"version":3,"file":"configGenerator.js","sourceRoot":"","sources":["../../src/builder/configGenerator.ts"],"names":[],"mappings":";;;;;AAeA,wDAsBC;AAGD,kDA0BC;AAGD,kDAgDC;AAGD,0CAmCC;AA3JD,2EAA2E;AAC3E,wDAA0B;AAC1B,4DAAoC;AACpC,6CAA0C;AAC1C,gDAAwB;AAExB,oCAMkB;AAElB,8DAA8D;AAC9D,SAAgB,sBAAsB,CACpC,OAA+B,EAC/B,OAAwB;IAExB,MAAM,gBAAgB,GAA2B,EAAE,CAAC;IAEpD,KAAK,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAClE,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,oBAAU,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACvE,gBAAgB,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE;gBAC/C,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAA,kBAAU,EACd,KAAK,EACL,uBAAuB,EACvB,6BAA6B,UAAU,GAAG,CAC3C,CAAC;QACJ,CAAC;IACH,CAAC;IAED,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AC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleSelector.d.ts","sourceRoot":"","sources":["../../src/builder/moduleSelector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa;;;
|
|
1
|
+
{"version":3,"file":"moduleSelector.d.ts","sourceRoot":"","sources":["../../src/builder/moduleSelector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa;;;YAUtB,MAAM;mBAAa,MAAM;;EAqBrD"}
|
|
@@ -4,7 +4,7 @@ exports.selectModules = selectModules;
|
|
|
4
4
|
// Determines which base and feature modules to include based on user configuration
|
|
5
5
|
function selectModules(config) {
|
|
6
6
|
// Determine framework for module integration
|
|
7
|
-
const framework = config.
|
|
7
|
+
const framework = config.framework;
|
|
8
8
|
// Select base template based on app type
|
|
9
9
|
const base = config.applicationType === "backend"
|
|
10
10
|
? `backend/${config.framework}`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleSelector.js","sourceRoot":"","sources":["../../src/builder/moduleSelector.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"moduleSelector.js","sourceRoot":"","sources":["../../src/builder/moduleSelector.ts"],"names":[],"mappings":";;AAGA,sCA+BC;AAhCD,mFAAmF;AACnF,SAAgB,aAAa,CAAC,MAAqB;IACjD,6CAA6C;IAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAEnC,yCAAyC;IACzC,MAAM,IAAI,GACR,MAAM,CAAC,eAAe,KAAK,SAAS;QAClC,CAAC,CAAC,WAAW,MAAM,CAAC,SAAS,EAAE;QAC/B,CAAC,CAAC,YAAY,MAAM,CAAC,SAAS,EAAE,CAAC;IAErC,MAAM,OAAO,GAA6C,EAAE,CAAC;IAE7D,6GAA6G;IAC7G,IAAI,MAAM,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;QAC/B,MAAM,IAAI,GACR,MAAM,CAAC,QAAQ,KAAK,UAAU;YAC5B,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,IAAI,SAAS,EAAE,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,6CAA6C;IAC7C,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,SAAS,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare function buildTemplateContext(config: ProjectConfig): {
|
|
|
6
6
|
projectName: string;
|
|
7
7
|
packageManager: import("../types").PackageManager;
|
|
8
8
|
database: import("../types").DatabaseOption;
|
|
9
|
-
framework: import("../types").BackendFramework | "
|
|
9
|
+
framework: import("../types").BackendFramework | import("../types").FrontendFramework;
|
|
10
10
|
port: number;
|
|
11
11
|
useDocker: boolean;
|
|
12
12
|
useAuth: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateContext.d.ts","sourceRoot":"","sources":["../../src/builder/templateContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAGD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAGD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"templateContext.d.ts","sourceRoot":"","sources":["../../src/builder/templateContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAGD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAGD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa;;;;;;;;;;;;gBAc5C,MAAM,KAAK,MAAM;;;EAO9B"}
|
|
@@ -20,7 +20,7 @@ function kebabCase(str) {
|
|
|
20
20
|
.toLowerCase();
|
|
21
21
|
}
|
|
22
22
|
function buildTemplateContext(config) {
|
|
23
|
-
const framework = config.
|
|
23
|
+
const framework = config.framework;
|
|
24
24
|
return {
|
|
25
25
|
projectName: config.projectName,
|
|
26
26
|
packageManager: config.packageManager,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateContext.js","sourceRoot":"","sources":["../../src/builder/templateContext.ts"],"names":[],"mappings":";;AAIA,8BAEC;AAGD,8BAEC;AAGD,8BAKC;AAED,
|
|
1
|
+
{"version":3,"file":"templateContext.js","sourceRoot":"","sources":["../../src/builder/templateContext.ts"],"names":[],"mappings":";;AAIA,8BAEC;AAGD,8BAEC;AAGD,8BAKC;AAED,oDAqBC;AAvCD,+BAA+B;AAC/B,SAAgB,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC;AAED,+BAA+B;AAC/B,SAAgB,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC;AAED,gCAAgC;AAChC,SAAgB,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG;SACP,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,0BAA0B;SAC9D,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,oCAAoC;SAC5D,WAAW,EAAE,CAAC;AACnB,CAAC;AAED,SAAgB,oBAAoB,CAAC,MAAqB;IACxD,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACnC,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,MAAM;QACnC,SAAS;QACT,IAAI,EAAE,IAAI,EAAE,eAAe;QAC3B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,KAAK;QACpC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE;YACP,SAAS;YACT,SAAS;YACT,SAAS;YACT,EAAE,EAAE,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;YACrC,MAAM,EAAE,GAAG,EAAE;gBACX,IAAI,MAAM,CAAC,cAAc,KAAK,KAAK;oBAAE,OAAO,KAAK,CAAC;gBAClD,OAAO,MAAM,CAAC;YAChB,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/prompts/stack.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/prompts/stack.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EAaf,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,aAAa,CAAC,CA6ExB"}
|
package/dist/prompts/stack.js
CHANGED
|
@@ -10,18 +10,23 @@ const types_1 = require("../types");
|
|
|
10
10
|
async function collectStackChoices(applicationType) {
|
|
11
11
|
return (0, prompts_1.group)({
|
|
12
12
|
framework: async () => {
|
|
13
|
-
if (applicationType === "
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
if (applicationType === "backend") {
|
|
14
|
+
while (true) {
|
|
15
|
+
const selection = await (0, prompts_1.select)({
|
|
16
|
+
message: "Select a backend framework:",
|
|
17
|
+
options: types_1.backendFrameworkOptions,
|
|
18
|
+
initialValue: "express",
|
|
19
|
+
});
|
|
20
|
+
if ((0, prompts_1.isCancel)(selection) || selection !== "nestjs")
|
|
21
|
+
return selection;
|
|
22
|
+
consola_1.default.warn("This framework is coming soon! Please select another option.");
|
|
23
|
+
}
|
|
24
24
|
}
|
|
25
|
+
return (0, prompts_1.select)({
|
|
26
|
+
message: "Select a frontend framework:",
|
|
27
|
+
options: types_1.frontendFrameworkOptions,
|
|
28
|
+
initialValue: "nextjs",
|
|
29
|
+
});
|
|
25
30
|
},
|
|
26
31
|
databaseType: () => (0, prompts_1.select)({
|
|
27
32
|
message: "Select a database:",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.js","sourceRoot":"","sources":["../../src/prompts/stack.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"stack.js","sourceRoot":"","sources":["../../src/prompts/stack.ts"],"names":[],"mappings":";;;;;AAoBA,kDA+EC;AAnGD,4CAA0E;AAC1E,sDAA8B;AAE9B,oCAekB;AAEX,KAAK,UAAU,mBAAmB,CACvC,eAAgC;IAEhC,OAAO,IAAA,eAAK,EACV;QACE,SAAS,EAAE,KAAK,IAAI,EAAE;YACpB,IAAI,eAAe,KAAK,SAAS,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J,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,iBAAO,EAAC,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QACzE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAA6B,EAAE;YACxD,IAAI,eAAe,KAAK,WAAW,IAAI,OAAO,CAAC,YAAY,KAAK,MAAM;gBACpE,OAAO,KAAK,CAAC;YACf,OAAO,IAAA,gBAAM,EAAC;gBACZ,OAAO,EACL,eAAe,KAAK,WAAW;oBAC7B,CAAC,CAAC,kBAAkB;oBACpB,CAAC,CAAC,qBAAqB;gBAC3B,OAAO,EAAE,mBAAW;gBACpB,YAAY,EAAE,KAAK;aACpB,CAAC,CAAC;QACL,CAAC;QACD,OAAO,EAAE,GAAG,EAAE,CACZ,IAAA,iBAAO,EAAC;YACN,OAAO,EAAE,8BAA8B;YACvC,YAAY,EAAE,IAAI;SACnB,CAAC;QACJ,WAAW,EAAE,GAAG,EAAE,CAChB,IAAA,iBAAO,EAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;KACzE,EACD;QACE,QAAQ,EAAE,GAAG,EAAE;YACb,IAAA,gBAAM,EAAC,sBAAsB,CAAC,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface Dependencies {
|
|
|
8
8
|
[packageName: string]: string;
|
|
9
9
|
}
|
|
10
10
|
export type BackendFramework = "express" | "nestjs";
|
|
11
|
-
export type FrontendFramework = "nextjs";
|
|
11
|
+
export type FrontendFramework = "nextjs" | "tanstack";
|
|
12
12
|
export interface ProjectConfig {
|
|
13
13
|
projectName: string;
|
|
14
14
|
applicationType: ApplicationType;
|
|
@@ -96,10 +96,15 @@ export declare const backendFrameworkOptions: ({
|
|
|
96
96
|
label: string;
|
|
97
97
|
hint: string;
|
|
98
98
|
})[];
|
|
99
|
-
export declare const frontendFrameworkOptions: {
|
|
99
|
+
export declare const frontendFrameworkOptions: ({
|
|
100
100
|
value: "nextjs";
|
|
101
101
|
label: string;
|
|
102
|
-
|
|
102
|
+
hint?: undefined;
|
|
103
|
+
} | {
|
|
104
|
+
value: "tanstack";
|
|
105
|
+
label: string;
|
|
106
|
+
hint: string;
|
|
107
|
+
})[];
|
|
103
108
|
export declare const databaseTypeOptions: ({
|
|
104
109
|
value: "none";
|
|
105
110
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAGpD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;AAG7D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAGnE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,CAAC;AAGtD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAGzD,MAAM,WAAW,YAAY;IAC3B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAGD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAGpD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAGpD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,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;QACP,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;QACnC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;QACnC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;KACpC,CAAC;CACH;AAGD,eAAO,MAAM,sBAAsB;;;;;;IAGlC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;IAGnC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;IAOpC,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;IAI/B,CAAC;AAGF,eAAO,MAAM,iBAAiB;;;GAE7B,CAAC;AAGF,eAAO,MAAM,oBAAoB;;;;;;IAGhC,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;IAK3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;IAIjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;IAGvB,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -29,7 +29,7 @@ function buildError(errorOrMessage, code, context, exitCode = 1) {
|
|
|
29
29
|
// Type-safe option definitions
|
|
30
30
|
exports.applicationTypeOptions = [
|
|
31
31
|
{ value: "backend", label: "Backend API (Express/NestJS)" },
|
|
32
|
-
{ value: "fullstack", label: "Full-stack App (Next.js)" },
|
|
32
|
+
{ value: "fullstack", label: "Full-stack App (Next.js/TanStack)" },
|
|
33
33
|
];
|
|
34
34
|
exports.backendFrameworkOptions = [
|
|
35
35
|
{ value: "express", label: "Express" },
|
|
@@ -37,6 +37,11 @@ exports.backendFrameworkOptions = [
|
|
|
37
37
|
];
|
|
38
38
|
exports.frontendFrameworkOptions = [
|
|
39
39
|
{ value: "nextjs", label: "Next.js 16 (App Router)" },
|
|
40
|
+
{
|
|
41
|
+
value: "tanstack",
|
|
42
|
+
label: "TanStack Start (React)",
|
|
43
|
+
hint: "(Release Candidate)",
|
|
44
|
+
},
|
|
40
45
|
];
|
|
41
46
|
// Database type options (what database system)
|
|
42
47
|
exports.databaseTypeOptions = [
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;;;AAmE5C,wCAUC;AA6CD,gCAaC;AAzED;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,YAA0B,EAC1B,GAAc;IAEd,IAAI,YAAY,KAAK,MAAM,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,+DAA+D;IAC/D,4CAA4C;IAC5C,OAAO,GAAG,CAAC;AACb,CAAC;AA4CD,kCAAkC;AAClC,SAAgB,UAAU,CACxB,cAAuB,EACvB,IAAY,EACZ,OAAgB,EAChB,WAAmB,CAAC;IAEpB,MAAM,OAAO,GACX,cAAc,YAAY,KAAK;QAC7B,CAAC,CAAC,cAAc,CAAC,OAAO;QACxB,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACjE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClD,CAAC;AAmBD,+BAA+B;AAClB,QAAA,sBAAsB,GAAG;IACpC,EAAE,KAAK,EAAE,SAAkB,EAAE,KAAK,EAAE,8BAA8B,EAAE;IACpE,EAAE,KAAK,EAAE,WAAoB,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;;;AAmE5C,wCAUC;AA6CD,gCAaC;AAzED;;;;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E,KAAK,EAAE,KAAK,EAAE;CACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-ts-stack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "A powerful CLI tool that generates fully configured TypeScript projects with backend, frontend, database integration, Docker support, and more--all through an interactive setup.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"tsx": true,
|
|
5
|
+
"tailwind": {
|
|
6
|
+
"config": "",
|
|
7
|
+
"css": "src/styles/app.css",
|
|
8
|
+
"baseColor": "neutral",
|
|
9
|
+
"cssVariables": true
|
|
10
|
+
},
|
|
11
|
+
"iconLibrary": "lucide",
|
|
12
|
+
"aliases": {
|
|
13
|
+
"components": "~/components",
|
|
14
|
+
"lib": "~/lib",
|
|
15
|
+
"ui": "~/components/ui",
|
|
16
|
+
"utils": "~/lib/utils"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "tanstack",
|
|
3
|
+
"name": "TanStack Start",
|
|
4
|
+
"description": "TanStack Start with TanStack Router, React 19, and Tailwind CSS v4",
|
|
5
|
+
"type": "base",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite dev",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"start": "srvx --prod -s ../client dist/server/server.js",
|
|
10
|
+
"preview": "vite preview",
|
|
11
|
+
"type:check": "tsc --noEmit",
|
|
12
|
+
"lint": "eslint src"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@tanstack/react-query": "^5.102.8",
|
|
16
|
+
"@tanstack/react-query-devtools": "^5.102.8",
|
|
17
|
+
"@tanstack/react-router": "^1.170.36",
|
|
18
|
+
"@tanstack/react-router-devtools": "^1.167.2",
|
|
19
|
+
"@tanstack/react-router-ssr-query": "^1.167.2",
|
|
20
|
+
"@tanstack/react-start": "^1.168.53",
|
|
21
|
+
"class-variance-authority": "^0.7.1",
|
|
22
|
+
"clsx": "^2.1.1",
|
|
23
|
+
"lucide-react": "^1.41.0",
|
|
24
|
+
"react": "^19.2.8",
|
|
25
|
+
"react-dom": "^19.2.8",
|
|
26
|
+
"srvx": "^1.0.4",
|
|
27
|
+
"tailwind-merge": "^3.6.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@eslint/js": "^10.0.1",
|
|
31
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
32
|
+
"@types/node": "^24.13.3",
|
|
33
|
+
"@types/react": "^19.2.18",
|
|
34
|
+
"@types/react-dom": "^19.2.7",
|
|
35
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
36
|
+
"eslint": "^10.10.0",
|
|
37
|
+
"tailwindcss": "^4.3.3",
|
|
38
|
+
"typescript": "^6.0.3",
|
|
39
|
+
"typescript-eslint": "^8.69.0",
|
|
40
|
+
"vite": "^8.3.0"
|
|
41
|
+
},
|
|
42
|
+
"envVars": {
|
|
43
|
+
"NODE_ENV": "development",
|
|
44
|
+
"PORT": "3000"
|
|
45
|
+
},
|
|
46
|
+
"templateFiles": [
|
|
47
|
+
"src/routes/index.tsx.hbs"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
|
|
5
|
+
const eslintConfig = defineConfig([
|
|
6
|
+
globalIgnores([
|
|
7
|
+
"dist/**",
|
|
8
|
+
".output/**",
|
|
9
|
+
"src/routeTree.gen.ts",
|
|
10
|
+
".tanstack/**",
|
|
11
|
+
"public/**",
|
|
12
|
+
]),
|
|
13
|
+
eslint.configs.recommended,
|
|
14
|
+
...tseslint.configs.recommended,
|
|
15
|
+
{
|
|
16
|
+
rules: {
|
|
17
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
18
|
+
"no-console": "off",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
export default eslintConfig;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
/node_modules
|
|
5
|
+
/.pnp
|
|
6
|
+
.pnp.*
|
|
7
|
+
.yarn/*
|
|
8
|
+
!.yarn/patches
|
|
9
|
+
!.yarn/plugins
|
|
10
|
+
!.yarn/releases
|
|
11
|
+
!.yarn/versions
|
|
12
|
+
|
|
13
|
+
# testing
|
|
14
|
+
/coverage
|
|
15
|
+
|
|
16
|
+
# production
|
|
17
|
+
/build
|
|
18
|
+
/dist
|
|
19
|
+
/.output
|
|
20
|
+
|
|
21
|
+
# tanstack
|
|
22
|
+
/.tanstack
|
|
23
|
+
|
|
24
|
+
# misc
|
|
25
|
+
.DS_Store
|
|
26
|
+
*.pem
|
|
27
|
+
|
|
28
|
+
# debug
|
|
29
|
+
npm-debug.log*
|
|
30
|
+
yarn-debug.log*
|
|
31
|
+
yarn-error.log*
|
|
32
|
+
.pnpm-debug.log*
|
|
33
|
+
|
|
34
|
+
# env files (can opt-in for committing if needed)
|
|
35
|
+
.env*
|
|
36
|
+
|
|
37
|
+
# typescript
|
|
38
|
+
*.tsbuildinfo
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" fill="none">
|
|
2
|
+
<rect width="128" height="128" rx="24" fill="#0a0a0a"/>
|
|
3
|
+
<circle cx="64" cy="64" r="20" stroke="#38bdf8" stroke-width="3" fill="none"/>
|
|
4
|
+
<circle cx="64" cy="64" r="8" fill="#38bdf8"/>
|
|
5
|
+
<path d="M64 44V24M64 104V84M44 64H24M104 64H84" stroke="#38bdf8" stroke-width="3" stroke-linecap="round"/>
|
|
6
|
+
<path d="M49.9 49.9L35.8 35.8M92.1 92.1L78 78M78.1 49.9L92.2 35.8M35.9 78.1L49.9 92.2" stroke="#38bdf8" stroke-width="2" stroke-linecap="round"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
import { cn } from "~/lib/utils";
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:pointer-events-none disabled:opacity-50",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default:
|
|
12
|
+
"bg-slate-950 text-white shadow-sm hover:bg-slate-800",
|
|
13
|
+
outline:
|
|
14
|
+
"border border-slate-200 bg-white text-slate-900 hover:bg-slate-100",
|
|
15
|
+
ghost: "text-slate-700 hover:bg-slate-100 hover:text-slate-950",
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "h-10 px-4 py-2",
|
|
19
|
+
sm: "h-9 px-3",
|
|
20
|
+
lg: "h-11 px-6 text-sm",
|
|
21
|
+
icon: "size-10",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "default",
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export interface ButtonProps
|
|
32
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
33
|
+
VariantProps<typeof buttonVariants> {}
|
|
34
|
+
|
|
35
|
+
function Button({
|
|
36
|
+
className,
|
|
37
|
+
variant,
|
|
38
|
+
size,
|
|
39
|
+
type = "button",
|
|
40
|
+
...props
|
|
41
|
+
}: ButtonProps) {
|
|
42
|
+
return (
|
|
43
|
+
<button
|
|
44
|
+
type={type}
|
|
45
|
+
className={cn(buttonVariants({ variant, size }), className)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "~/lib/utils";
|
|
4
|
+
|
|
5
|
+
function Card({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
9
|
+
return (
|
|
10
|
+
<div
|
|
11
|
+
className={cn(
|
|
12
|
+
"rounded-3xl border border-slate-200/80 bg-white text-slate-950 shadow-sm",
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function CardHeader({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
24
|
+
return <div className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function CardTitle({
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}: React.HTMLAttributes<HTMLHeadingElement>) {
|
|
31
|
+
return (
|
|
32
|
+
<h3
|
|
33
|
+
className={cn("text-2xl font-semibold leading-none tracking-tight", className)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function CardDescription({
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: React.HTMLAttributes<HTMLParagraphElement>) {
|
|
43
|
+
return <p className={cn("text-sm text-slate-600", className)} {...props} />;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function CardContent({
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
50
|
+
return <div className={cn("p-6 pt-0", className)} {...props} />;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function CardFooter({
|
|
54
|
+
className,
|
|
55
|
+
...props
|
|
56
|
+
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
57
|
+
return <div className={cn("flex items-center p-6 pt-0", className)} {...props} />;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "~/lib/utils";
|
|
4
|
+
|
|
5
|
+
function FieldGroup({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
9
|
+
return <div className={cn("space-y-5", className)} {...props} />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type FieldProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
13
|
+
"data-invalid"?: boolean;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function Field({
|
|
17
|
+
className,
|
|
18
|
+
"data-invalid": dataInvalid,
|
|
19
|
+
...props
|
|
20
|
+
}: FieldProps) {
|
|
21
|
+
return (
|
|
22
|
+
<div
|
|
23
|
+
data-invalid={dataInvalid}
|
|
24
|
+
className={cn("space-y-2", className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function FieldLabel({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React.LabelHTMLAttributes<HTMLLabelElement>) {
|
|
34
|
+
return (
|
|
35
|
+
<label
|
|
36
|
+
className={cn("text-sm font-medium text-slate-900", className)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function FieldDescription({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}: React.HTMLAttributes<HTMLParagraphElement>) {
|
|
46
|
+
return <p className={cn("text-sm text-slate-500", className)} {...props} />;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type FieldErrorProps = React.HTMLAttributes<HTMLParagraphElement> & {
|
|
50
|
+
errors?: Array<{ message?: string } | undefined>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
function FieldError({ className, errors, ...props }: FieldErrorProps) {
|
|
54
|
+
const message = errors?.find((error) => error?.message)?.message;
|
|
55
|
+
|
|
56
|
+
if (!message) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<p className={cn("text-sm font-medium text-rose-600", className)} {...props}>
|
|
62
|
+
{message}
|
|
63
|
+
</p>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { Field, FieldDescription, FieldError, FieldGroup, FieldLabel };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "~/lib/utils";
|
|
4
|
+
|
|
5
|
+
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
|
+
return (
|
|
7
|
+
<input
|
|
8
|
+
type={type}
|
|
9
|
+
className={cn(
|
|
10
|
+
"flex h-11 w-full rounded-2xl border border-slate-200 bg-white px-3 py-2 text-sm text-slate-950 shadow-sm transition-[color,box-shadow] outline-none placeholder:text-slate-400 focus-visible:border-sky-500 focus-visible:ring-[3px] focus-visible:ring-sky-500/20 disabled:cursor-not-allowed disabled:opacity-50",
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { Input };
|