diff --git a/src/components/application-starter/useApplicationStarterUrl.ts b/src/components/application-starter/useApplicationStarterUrl.ts index 838192375..6739e9b70 100644 --- a/src/components/application-starter/useApplicationStarterUrl.ts +++ b/src/components/application-starter/useApplicationStarterUrl.ts @@ -17,9 +17,9 @@ interface ApplicationStarterSearchParams { template?: string // template preset ID features?: string // comma-separated feature IDs pm?: string // package manager: pnpm, npm, yarn, bun - tailwind?: string + tailwind?: 'false' | true // Feature options serialized as: featureId.optionKey=value - [key: string]: string | undefined + [key: string]: string | boolean | undefined } export function useApplicationStarterUrl() { diff --git a/src/routes/application-starter.index.tsx b/src/routes/application-starter.index.tsx index 63d6ee7e2..78b4c2ddd 100644 --- a/src/routes/application-starter.index.tsx +++ b/src/routes/application-starter.index.tsx @@ -23,7 +23,7 @@ const applicationStarterSearchSchema = v.pipe( framework: v.optional(v.string()), features: v.optional(v.string()), // comma-separated feature IDs pm: v.optional(v.picklist(['pnpm', 'npm', 'yarn', 'bun'])), - tailwind: v.optional(v.literal('false')), + tailwind: v.optional(v.union([v.literal('false'), v.literal(true)])), tab: v.optional(v.picklist(['summary', 'code', 'preview'])), file: v.optional(v.string()), // selected file in files tab addon: v.optional(v.string()), // selected addon in addons tab diff --git a/tests/application-starter-search.test.ts b/tests/application-starter-search.test.ts index 2b293fbe4..bc2a660c1 100644 --- a/tests/application-starter-search.test.ts +++ b/tests/application-starter-search.test.ts @@ -28,6 +28,7 @@ test('application starter preserves optional fields and custom feature options', }, ...['pnpm', 'npm', 'yarn', 'bun'].map((pm) => ({ pm })), ...['summary', 'code', 'preview'].map((tab) => ({ tab })), + { tailwind: true }, ]) { const result = await standardSchema.validate(input) assert.equal(result.issues, undefined) @@ -41,7 +42,6 @@ test('application starter rejects invalid known fields instead of coercing them' [], 'name=app', { pm: 'deno' }, - { tailwind: true }, { tailwind: 'true' }, { tab: 'unknown' }, ...[