kofi-stack-types 2.0.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.
@@ -0,0 +1,14 @@
1
+
2
+ > kofi-stack-types@2.0.0 build /Users/theodenanyoh/Documents/Krumalabs/create-kofi-stack-v2/packages/types
3
+ > tsup src/index.ts --format esm --dts
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Target: es2022
9
+ ESM Build start
10
+ DTS Build start
11
+ ESM dist/index.js 4.42 KB
12
+ ESM ⚡️ Build success in 273ms
13
+ DTS ⚡️ Build success in 573ms
14
+ DTS dist/index.d.ts 17.24 KB
@@ -0,0 +1,312 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const ProjectStructureSchema: z.ZodEnum<["standalone", "monorepo"]>;
4
+ declare const MarketingSiteSchema: z.ZodEnum<["none", "nextjs", "payload"]>;
5
+ declare const AuthProviderSchema: z.ZodEnum<["github", "google", "discord", "twitter", "apple", "microsoft", "linkedin"]>;
6
+ declare const AnalyticsProviderSchema: z.ZodEnum<["none", "posthog", "vercel"]>;
7
+ declare const UploadsProviderSchema: z.ZodEnum<["none", "uploadthing", "s3", "vercel-blob"]>;
8
+ declare const ComponentLibrarySchema: z.ZodEnum<["base-ui", "radix"]>;
9
+ declare const StyleVariantSchema: z.ZodEnum<["default", "new-york"]>;
10
+ declare const BaseColorSchema: z.ZodEnum<["neutral", "gray", "zinc", "slate", "stone"]>;
11
+ declare const ThemeColorSchema: z.ZodEnum<["zinc", "slate", "stone", "gray", "neutral", "red", "rose", "orange", "green", "blue", "yellow", "violet"]>;
12
+ declare const MenuAccentSchema: z.ZodEnum<["none", "muted", "primary"]>;
13
+ declare const IconLibrarySchema: z.ZodEnum<["lucide", "hugeicons"]>;
14
+ declare const FontFamilySchema: z.ZodEnum<["geist", "inter", "system"]>;
15
+ declare const BorderRadiusSchema: z.ZodEnum<["0", "0.3", "0.5", "0.75", "1.0"]>;
16
+ declare const SpacingScaleSchema: z.ZodEnum<["default", "compact", "comfortable"]>;
17
+ declare const PackageManagerSchema: z.ZodEnum<["pnpm", "npm", "bun"]>;
18
+ declare const AddonSchema: z.ZodEnum<["biome", "husky", "turborepo", "playwright", "vitest", "rate-limiting", "monitoring"]>;
19
+ declare const DesignSystemConfigSchema: z.ZodObject<{
20
+ componentLibrary: z.ZodEnum<["base-ui", "radix"]>;
21
+ styleVariant: z.ZodEnum<["default", "new-york"]>;
22
+ baseColor: z.ZodEnum<["neutral", "gray", "zinc", "slate", "stone"]>;
23
+ themeColor: z.ZodEnum<["zinc", "slate", "stone", "gray", "neutral", "red", "rose", "orange", "green", "blue", "yellow", "violet"]>;
24
+ menuAccent: z.ZodEnum<["none", "muted", "primary"]>;
25
+ iconLibrary: z.ZodEnum<["lucide", "hugeicons"]>;
26
+ headingFont: z.ZodEnum<["geist", "inter", "system"]>;
27
+ bodyFont: z.ZodEnum<["geist", "inter", "system"]>;
28
+ borderRadius: z.ZodEnum<["0", "0.3", "0.5", "0.75", "1.0"]>;
29
+ spacingScale: z.ZodEnum<["default", "compact", "comfortable"]>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ componentLibrary: "base-ui" | "radix";
32
+ styleVariant: "default" | "new-york";
33
+ baseColor: "neutral" | "gray" | "zinc" | "slate" | "stone";
34
+ themeColor: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet";
35
+ menuAccent: "none" | "muted" | "primary";
36
+ iconLibrary: "lucide" | "hugeicons";
37
+ headingFont: "geist" | "inter" | "system";
38
+ bodyFont: "geist" | "inter" | "system";
39
+ borderRadius: "0" | "0.3" | "0.5" | "0.75" | "1.0";
40
+ spacingScale: "default" | "compact" | "comfortable";
41
+ }, {
42
+ componentLibrary: "base-ui" | "radix";
43
+ styleVariant: "default" | "new-york";
44
+ baseColor: "neutral" | "gray" | "zinc" | "slate" | "stone";
45
+ themeColor: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet";
46
+ menuAccent: "none" | "muted" | "primary";
47
+ iconLibrary: "lucide" | "hugeicons";
48
+ headingFont: "geist" | "inter" | "system";
49
+ bodyFont: "geist" | "inter" | "system";
50
+ borderRadius: "0" | "0.3" | "0.5" | "0.75" | "1.0";
51
+ spacingScale: "default" | "compact" | "comfortable";
52
+ }>;
53
+ declare const AuthConfigSchema: z.ZodObject<{
54
+ providers: z.ZodArray<z.ZodEnum<["github", "google", "discord", "twitter", "apple", "microsoft", "linkedin"]>, "many">;
55
+ organizations: z.ZodBoolean;
56
+ }, "strip", z.ZodTypeAny, {
57
+ providers: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[];
58
+ organizations: boolean;
59
+ }, {
60
+ providers: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[];
61
+ organizations: boolean;
62
+ }>;
63
+ declare const IntegrationsConfigSchema: z.ZodObject<{
64
+ analytics: z.ZodEnum<["none", "posthog", "vercel"]>;
65
+ uploads: z.ZodEnum<["none", "uploadthing", "s3", "vercel-blob"]>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ analytics: "none" | "posthog" | "vercel";
68
+ uploads: "none" | "uploadthing" | "s3" | "vercel-blob";
69
+ }, {
70
+ analytics: "none" | "posthog" | "vercel";
71
+ uploads: "none" | "uploadthing" | "s3" | "vercel-blob";
72
+ }>;
73
+ declare const ProjectConfigSchema: z.ZodObject<{
74
+ projectName: z.ZodString;
75
+ targetDir: z.ZodString;
76
+ structure: z.ZodEnum<["standalone", "monorepo"]>;
77
+ marketingSite: z.ZodEnum<["none", "nextjs", "payload"]>;
78
+ shadcn: z.ZodObject<{
79
+ componentLibrary: z.ZodEnum<["base-ui", "radix"]>;
80
+ styleVariant: z.ZodEnum<["default", "new-york"]>;
81
+ baseColor: z.ZodEnum<["neutral", "gray", "zinc", "slate", "stone"]>;
82
+ themeColor: z.ZodEnum<["zinc", "slate", "stone", "gray", "neutral", "red", "rose", "orange", "green", "blue", "yellow", "violet"]>;
83
+ menuAccent: z.ZodEnum<["none", "muted", "primary"]>;
84
+ iconLibrary: z.ZodEnum<["lucide", "hugeicons"]>;
85
+ headingFont: z.ZodEnum<["geist", "inter", "system"]>;
86
+ bodyFont: z.ZodEnum<["geist", "inter", "system"]>;
87
+ borderRadius: z.ZodEnum<["0", "0.3", "0.5", "0.75", "1.0"]>;
88
+ spacingScale: z.ZodEnum<["default", "compact", "comfortable"]>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ componentLibrary: "base-ui" | "radix";
91
+ styleVariant: "default" | "new-york";
92
+ baseColor: "neutral" | "gray" | "zinc" | "slate" | "stone";
93
+ themeColor: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet";
94
+ menuAccent: "none" | "muted" | "primary";
95
+ iconLibrary: "lucide" | "hugeicons";
96
+ headingFont: "geist" | "inter" | "system";
97
+ bodyFont: "geist" | "inter" | "system";
98
+ borderRadius: "0" | "0.3" | "0.5" | "0.75" | "1.0";
99
+ spacingScale: "default" | "compact" | "comfortable";
100
+ }, {
101
+ componentLibrary: "base-ui" | "radix";
102
+ styleVariant: "default" | "new-york";
103
+ baseColor: "neutral" | "gray" | "zinc" | "slate" | "stone";
104
+ themeColor: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet";
105
+ menuAccent: "none" | "muted" | "primary";
106
+ iconLibrary: "lucide" | "hugeicons";
107
+ headingFont: "geist" | "inter" | "system";
108
+ bodyFont: "geist" | "inter" | "system";
109
+ borderRadius: "0" | "0.3" | "0.5" | "0.75" | "1.0";
110
+ spacingScale: "default" | "compact" | "comfortable";
111
+ }>;
112
+ auth: z.ZodObject<{
113
+ providers: z.ZodArray<z.ZodEnum<["github", "google", "discord", "twitter", "apple", "microsoft", "linkedin"]>, "many">;
114
+ organizations: z.ZodBoolean;
115
+ }, "strip", z.ZodTypeAny, {
116
+ providers: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[];
117
+ organizations: boolean;
118
+ }, {
119
+ providers: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[];
120
+ organizations: boolean;
121
+ }>;
122
+ integrations: z.ZodObject<{
123
+ analytics: z.ZodEnum<["none", "posthog", "vercel"]>;
124
+ uploads: z.ZodEnum<["none", "uploadthing", "s3", "vercel-blob"]>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ analytics: "none" | "posthog" | "vercel";
127
+ uploads: "none" | "uploadthing" | "s3" | "vercel-blob";
128
+ }, {
129
+ analytics: "none" | "posthog" | "vercel";
130
+ uploads: "none" | "uploadthing" | "s3" | "vercel-blob";
131
+ }>;
132
+ addons: z.ZodArray<z.ZodEnum<["biome", "husky", "turborepo", "playwright", "vitest", "rate-limiting", "monitoring"]>, "many">;
133
+ packageManager: z.ZodEnum<["pnpm", "npm", "bun"]>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ projectName: string;
136
+ targetDir: string;
137
+ structure: "standalone" | "monorepo";
138
+ marketingSite: "none" | "nextjs" | "payload";
139
+ shadcn: {
140
+ componentLibrary: "base-ui" | "radix";
141
+ styleVariant: "default" | "new-york";
142
+ baseColor: "neutral" | "gray" | "zinc" | "slate" | "stone";
143
+ themeColor: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet";
144
+ menuAccent: "none" | "muted" | "primary";
145
+ iconLibrary: "lucide" | "hugeicons";
146
+ headingFont: "geist" | "inter" | "system";
147
+ bodyFont: "geist" | "inter" | "system";
148
+ borderRadius: "0" | "0.3" | "0.5" | "0.75" | "1.0";
149
+ spacingScale: "default" | "compact" | "comfortable";
150
+ };
151
+ auth: {
152
+ providers: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[];
153
+ organizations: boolean;
154
+ };
155
+ integrations: {
156
+ analytics: "none" | "posthog" | "vercel";
157
+ uploads: "none" | "uploadthing" | "s3" | "vercel-blob";
158
+ };
159
+ addons: ("biome" | "husky" | "turborepo" | "playwright" | "vitest" | "rate-limiting" | "monitoring")[];
160
+ packageManager: "pnpm" | "npm" | "bun";
161
+ }, {
162
+ projectName: string;
163
+ targetDir: string;
164
+ structure: "standalone" | "monorepo";
165
+ marketingSite: "none" | "nextjs" | "payload";
166
+ shadcn: {
167
+ componentLibrary: "base-ui" | "radix";
168
+ styleVariant: "default" | "new-york";
169
+ baseColor: "neutral" | "gray" | "zinc" | "slate" | "stone";
170
+ themeColor: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet";
171
+ menuAccent: "none" | "muted" | "primary";
172
+ iconLibrary: "lucide" | "hugeicons";
173
+ headingFont: "geist" | "inter" | "system";
174
+ bodyFont: "geist" | "inter" | "system";
175
+ borderRadius: "0" | "0.3" | "0.5" | "0.75" | "1.0";
176
+ spacingScale: "default" | "compact" | "comfortable";
177
+ };
178
+ auth: {
179
+ providers: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[];
180
+ organizations: boolean;
181
+ };
182
+ integrations: {
183
+ analytics: "none" | "posthog" | "vercel";
184
+ uploads: "none" | "uploadthing" | "s3" | "vercel-blob";
185
+ };
186
+ addons: ("biome" | "husky" | "turborepo" | "playwright" | "vitest" | "rate-limiting" | "monitoring")[];
187
+ packageManager: "pnpm" | "npm" | "bun";
188
+ }>;
189
+ declare const CLIInputSchema: z.ZodObject<{
190
+ projectName: z.ZodOptional<z.ZodString>;
191
+ structure: z.ZodOptional<z.ZodEnum<["standalone", "monorepo"]>>;
192
+ marketingSite: z.ZodOptional<z.ZodEnum<["none", "nextjs", "payload"]>>;
193
+ componentLibrary: z.ZodOptional<z.ZodEnum<["base-ui", "radix"]>>;
194
+ styleVariant: z.ZodOptional<z.ZodEnum<["default", "new-york"]>>;
195
+ baseColor: z.ZodOptional<z.ZodEnum<["neutral", "gray", "zinc", "slate", "stone"]>>;
196
+ themeColor: z.ZodOptional<z.ZodEnum<["zinc", "slate", "stone", "gray", "neutral", "red", "rose", "orange", "green", "blue", "yellow", "violet"]>>;
197
+ menuAccent: z.ZodOptional<z.ZodEnum<["none", "muted", "primary"]>>;
198
+ iconLibrary: z.ZodOptional<z.ZodEnum<["lucide", "hugeicons"]>>;
199
+ headingFont: z.ZodOptional<z.ZodEnum<["geist", "inter", "system"]>>;
200
+ bodyFont: z.ZodOptional<z.ZodEnum<["geist", "inter", "system"]>>;
201
+ borderRadius: z.ZodOptional<z.ZodEnum<["0", "0.3", "0.5", "0.75", "1.0"]>>;
202
+ spacingScale: z.ZodOptional<z.ZodEnum<["default", "compact", "comfortable"]>>;
203
+ authProviders: z.ZodOptional<z.ZodArray<z.ZodEnum<["github", "google", "discord", "twitter", "apple", "microsoft", "linkedin"]>, "many">>;
204
+ organizations: z.ZodOptional<z.ZodBoolean>;
205
+ analytics: z.ZodOptional<z.ZodEnum<["none", "posthog", "vercel"]>>;
206
+ uploads: z.ZodOptional<z.ZodEnum<["none", "uploadthing", "s3", "vercel-blob"]>>;
207
+ addons: z.ZodOptional<z.ZodArray<z.ZodEnum<["biome", "husky", "turborepo", "playwright", "vitest", "rate-limiting", "monitoring"]>, "many">>;
208
+ git: z.ZodOptional<z.ZodBoolean>;
209
+ packageManager: z.ZodOptional<z.ZodEnum<["pnpm", "npm", "bun"]>>;
210
+ install: z.ZodOptional<z.ZodBoolean>;
211
+ yes: z.ZodOptional<z.ZodBoolean>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ componentLibrary?: "base-ui" | "radix" | undefined;
214
+ styleVariant?: "default" | "new-york" | undefined;
215
+ baseColor?: "neutral" | "gray" | "zinc" | "slate" | "stone" | undefined;
216
+ themeColor?: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet" | undefined;
217
+ menuAccent?: "none" | "muted" | "primary" | undefined;
218
+ iconLibrary?: "lucide" | "hugeicons" | undefined;
219
+ headingFont?: "geist" | "inter" | "system" | undefined;
220
+ bodyFont?: "geist" | "inter" | "system" | undefined;
221
+ borderRadius?: "0" | "0.3" | "0.5" | "0.75" | "1.0" | undefined;
222
+ spacingScale?: "default" | "compact" | "comfortable" | undefined;
223
+ organizations?: boolean | undefined;
224
+ analytics?: "none" | "posthog" | "vercel" | undefined;
225
+ uploads?: "none" | "uploadthing" | "s3" | "vercel-blob" | undefined;
226
+ projectName?: string | undefined;
227
+ structure?: "standalone" | "monorepo" | undefined;
228
+ marketingSite?: "none" | "nextjs" | "payload" | undefined;
229
+ addons?: ("biome" | "husky" | "turborepo" | "playwright" | "vitest" | "rate-limiting" | "monitoring")[] | undefined;
230
+ packageManager?: "pnpm" | "npm" | "bun" | undefined;
231
+ authProviders?: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[] | undefined;
232
+ git?: boolean | undefined;
233
+ install?: boolean | undefined;
234
+ yes?: boolean | undefined;
235
+ }, {
236
+ componentLibrary?: "base-ui" | "radix" | undefined;
237
+ styleVariant?: "default" | "new-york" | undefined;
238
+ baseColor?: "neutral" | "gray" | "zinc" | "slate" | "stone" | undefined;
239
+ themeColor?: "neutral" | "gray" | "zinc" | "slate" | "stone" | "red" | "rose" | "orange" | "green" | "blue" | "yellow" | "violet" | undefined;
240
+ menuAccent?: "none" | "muted" | "primary" | undefined;
241
+ iconLibrary?: "lucide" | "hugeicons" | undefined;
242
+ headingFont?: "geist" | "inter" | "system" | undefined;
243
+ bodyFont?: "geist" | "inter" | "system" | undefined;
244
+ borderRadius?: "0" | "0.3" | "0.5" | "0.75" | "1.0" | undefined;
245
+ spacingScale?: "default" | "compact" | "comfortable" | undefined;
246
+ organizations?: boolean | undefined;
247
+ analytics?: "none" | "posthog" | "vercel" | undefined;
248
+ uploads?: "none" | "uploadthing" | "s3" | "vercel-blob" | undefined;
249
+ projectName?: string | undefined;
250
+ structure?: "standalone" | "monorepo" | undefined;
251
+ marketingSite?: "none" | "nextjs" | "payload" | undefined;
252
+ addons?: ("biome" | "husky" | "turborepo" | "playwright" | "vitest" | "rate-limiting" | "monitoring")[] | undefined;
253
+ packageManager?: "pnpm" | "npm" | "bun" | undefined;
254
+ authProviders?: ("github" | "google" | "discord" | "twitter" | "apple" | "microsoft" | "linkedin")[] | undefined;
255
+ git?: boolean | undefined;
256
+ install?: boolean | undefined;
257
+ yes?: boolean | undefined;
258
+ }>;
259
+ declare const DEFAULT_CONFIG: z.infer<typeof ProjectConfigSchema>;
260
+
261
+ type ProjectStructure = z.infer<typeof ProjectStructureSchema>;
262
+ type MarketingSite = z.infer<typeof MarketingSiteSchema>;
263
+ type AuthProvider = z.infer<typeof AuthProviderSchema>;
264
+ type AnalyticsProvider = z.infer<typeof AnalyticsProviderSchema>;
265
+ type UploadsProvider = z.infer<typeof UploadsProviderSchema>;
266
+ type ComponentLibrary = z.infer<typeof ComponentLibrarySchema>;
267
+ type StyleVariant = z.infer<typeof StyleVariantSchema>;
268
+ type BaseColor = z.infer<typeof BaseColorSchema>;
269
+ type ThemeColor = z.infer<typeof ThemeColorSchema>;
270
+ type MenuAccent = z.infer<typeof MenuAccentSchema>;
271
+ type IconLibrary = z.infer<typeof IconLibrarySchema>;
272
+ type FontFamily = z.infer<typeof FontFamilySchema>;
273
+ type BorderRadius = z.infer<typeof BorderRadiusSchema>;
274
+ type SpacingScale = z.infer<typeof SpacingScaleSchema>;
275
+ type PackageManager = z.infer<typeof PackageManagerSchema>;
276
+ type Addon = z.infer<typeof AddonSchema>;
277
+ type DesignSystemConfig = z.infer<typeof DesignSystemConfigSchema>;
278
+ type AuthConfig = z.infer<typeof AuthConfigSchema>;
279
+ type IntegrationsConfig = z.infer<typeof IntegrationsConfigSchema>;
280
+ type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
281
+ type CLIInput = z.infer<typeof CLIInputSchema>;
282
+ interface VirtualFile {
283
+ type: 'file';
284
+ path: string;
285
+ name: string;
286
+ content: string | Buffer;
287
+ extension: string;
288
+ sourcePath?: string;
289
+ }
290
+ interface VirtualDirectory {
291
+ type: 'directory';
292
+ path: string;
293
+ name: string;
294
+ children: VirtualNode[];
295
+ }
296
+ type VirtualNode = VirtualFile | VirtualDirectory;
297
+ interface VirtualFileTree {
298
+ root: VirtualDirectory;
299
+ fileCount: number;
300
+ directoryCount: number;
301
+ config: ProjectConfig;
302
+ }
303
+ interface GeneratorOptions {
304
+ config: ProjectConfig;
305
+ }
306
+ interface GeneratorResult {
307
+ tree: VirtualFileTree;
308
+ success: boolean;
309
+ errors?: string[];
310
+ }
311
+
312
+ export { type Addon, AddonSchema, type AnalyticsProvider, AnalyticsProviderSchema, type AuthConfig, AuthConfigSchema, type AuthProvider, AuthProviderSchema, type BaseColor, BaseColorSchema, type BorderRadius, BorderRadiusSchema, type CLIInput, CLIInputSchema, type ComponentLibrary, ComponentLibrarySchema, DEFAULT_CONFIG, type DesignSystemConfig, DesignSystemConfigSchema, type FontFamily, FontFamilySchema, type GeneratorOptions, type GeneratorResult, type IconLibrary, IconLibrarySchema, type IntegrationsConfig, IntegrationsConfigSchema, type MarketingSite, MarketingSiteSchema, type MenuAccent, MenuAccentSchema, type PackageManager, PackageManagerSchema, type ProjectConfig, ProjectConfigSchema, type ProjectStructure, ProjectStructureSchema, type SpacingScale, SpacingScaleSchema, type StyleVariant, StyleVariantSchema, type ThemeColor, ThemeColorSchema, type UploadsProvider, UploadsProviderSchema, type VirtualDirectory, type VirtualFile, type VirtualFileTree, type VirtualNode };
package/dist/index.js ADDED
@@ -0,0 +1,167 @@
1
+ // src/schemas.ts
2
+ import { z } from "zod";
3
+ var ProjectStructureSchema = z.enum(["standalone", "monorepo"]);
4
+ var MarketingSiteSchema = z.enum(["none", "nextjs", "payload"]);
5
+ var AuthProviderSchema = z.enum([
6
+ "github",
7
+ "google",
8
+ "discord",
9
+ "twitter",
10
+ "apple",
11
+ "microsoft",
12
+ "linkedin"
13
+ ]);
14
+ var AnalyticsProviderSchema = z.enum(["none", "posthog", "vercel"]);
15
+ var UploadsProviderSchema = z.enum([
16
+ "none",
17
+ "uploadthing",
18
+ "s3",
19
+ "vercel-blob"
20
+ ]);
21
+ var ComponentLibrarySchema = z.enum(["base-ui", "radix"]);
22
+ var StyleVariantSchema = z.enum(["default", "new-york"]);
23
+ var BaseColorSchema = z.enum(["neutral", "gray", "zinc", "slate", "stone"]);
24
+ var ThemeColorSchema = z.enum([
25
+ "zinc",
26
+ "slate",
27
+ "stone",
28
+ "gray",
29
+ "neutral",
30
+ "red",
31
+ "rose",
32
+ "orange",
33
+ "green",
34
+ "blue",
35
+ "yellow",
36
+ "violet"
37
+ ]);
38
+ var MenuAccentSchema = z.enum(["none", "muted", "primary"]);
39
+ var IconLibrarySchema = z.enum(["lucide", "hugeicons"]);
40
+ var FontFamilySchema = z.enum(["geist", "inter", "system"]);
41
+ var BorderRadiusSchema = z.enum(["0", "0.3", "0.5", "0.75", "1.0"]);
42
+ var SpacingScaleSchema = z.enum(["default", "compact", "comfortable"]);
43
+ var PackageManagerSchema = z.enum(["pnpm", "npm", "bun"]);
44
+ var AddonSchema = z.enum([
45
+ "biome",
46
+ "husky",
47
+ "turborepo",
48
+ "playwright",
49
+ "vitest",
50
+ "rate-limiting",
51
+ "monitoring"
52
+ ]);
53
+ var DesignSystemConfigSchema = z.object({
54
+ componentLibrary: ComponentLibrarySchema,
55
+ styleVariant: StyleVariantSchema,
56
+ baseColor: BaseColorSchema,
57
+ themeColor: ThemeColorSchema,
58
+ menuAccent: MenuAccentSchema,
59
+ iconLibrary: IconLibrarySchema,
60
+ headingFont: FontFamilySchema,
61
+ bodyFont: FontFamilySchema,
62
+ borderRadius: BorderRadiusSchema,
63
+ spacingScale: SpacingScaleSchema
64
+ });
65
+ var AuthConfigSchema = z.object({
66
+ providers: z.array(AuthProviderSchema),
67
+ organizations: z.boolean()
68
+ });
69
+ var IntegrationsConfigSchema = z.object({
70
+ analytics: AnalyticsProviderSchema,
71
+ uploads: UploadsProviderSchema
72
+ });
73
+ var ProjectConfigSchema = z.object({
74
+ // Basic info
75
+ projectName: z.string(),
76
+ targetDir: z.string(),
77
+ // Structure
78
+ structure: ProjectStructureSchema,
79
+ marketingSite: MarketingSiteSchema,
80
+ // Design system
81
+ shadcn: DesignSystemConfigSchema,
82
+ // Auth
83
+ auth: AuthConfigSchema,
84
+ // Integrations
85
+ integrations: IntegrationsConfigSchema,
86
+ // Addons
87
+ addons: z.array(AddonSchema),
88
+ // Setup options
89
+ packageManager: PackageManagerSchema
90
+ });
91
+ var CLIInputSchema = z.object({
92
+ projectName: z.string().optional(),
93
+ structure: ProjectStructureSchema.optional(),
94
+ marketingSite: MarketingSiteSchema.optional(),
95
+ componentLibrary: ComponentLibrarySchema.optional(),
96
+ styleVariant: StyleVariantSchema.optional(),
97
+ baseColor: BaseColorSchema.optional(),
98
+ themeColor: ThemeColorSchema.optional(),
99
+ menuAccent: MenuAccentSchema.optional(),
100
+ iconLibrary: IconLibrarySchema.optional(),
101
+ headingFont: FontFamilySchema.optional(),
102
+ bodyFont: FontFamilySchema.optional(),
103
+ borderRadius: BorderRadiusSchema.optional(),
104
+ spacingScale: SpacingScaleSchema.optional(),
105
+ authProviders: z.array(AuthProviderSchema).optional(),
106
+ organizations: z.boolean().optional(),
107
+ analytics: AnalyticsProviderSchema.optional(),
108
+ uploads: UploadsProviderSchema.optional(),
109
+ addons: z.array(AddonSchema).optional(),
110
+ git: z.boolean().optional(),
111
+ packageManager: PackageManagerSchema.optional(),
112
+ install: z.boolean().optional(),
113
+ yes: z.boolean().optional()
114
+ // Skip prompts with defaults
115
+ });
116
+ var DEFAULT_CONFIG = {
117
+ projectName: "my-kofi-app",
118
+ targetDir: "",
119
+ structure: "standalone",
120
+ marketingSite: "none",
121
+ shadcn: {
122
+ componentLibrary: "base-ui",
123
+ styleVariant: "default",
124
+ baseColor: "neutral",
125
+ themeColor: "zinc",
126
+ menuAccent: "muted",
127
+ iconLibrary: "hugeicons",
128
+ headingFont: "geist",
129
+ bodyFont: "geist",
130
+ borderRadius: "0.5",
131
+ spacingScale: "default"
132
+ },
133
+ auth: {
134
+ providers: ["github", "google"],
135
+ organizations: false
136
+ },
137
+ integrations: {
138
+ analytics: "none",
139
+ uploads: "none"
140
+ },
141
+ addons: [],
142
+ packageManager: "pnpm"
143
+ };
144
+ export {
145
+ AddonSchema,
146
+ AnalyticsProviderSchema,
147
+ AuthConfigSchema,
148
+ AuthProviderSchema,
149
+ BaseColorSchema,
150
+ BorderRadiusSchema,
151
+ CLIInputSchema,
152
+ ComponentLibrarySchema,
153
+ DEFAULT_CONFIG,
154
+ DesignSystemConfigSchema,
155
+ FontFamilySchema,
156
+ IconLibrarySchema,
157
+ IntegrationsConfigSchema,
158
+ MarketingSiteSchema,
159
+ MenuAccentSchema,
160
+ PackageManagerSchema,
161
+ ProjectConfigSchema,
162
+ ProjectStructureSchema,
163
+ SpacingScaleSchema,
164
+ StyleVariantSchema,
165
+ ThemeColorSchema,
166
+ UploadsProviderSchema
167
+ };
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "kofi-stack-types",
3
+ "version": "2.0.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ }
12
+ },
13
+ "scripts": {
14
+ "build": "tsup src/index.ts --format esm --dts",
15
+ "dev": "tsup src/index.ts --format esm --dts --watch",
16
+ "typecheck": "tsc --noEmit"
17
+ },
18
+ "dependencies": {
19
+ "zod": "^3.23.0"
20
+ },
21
+ "devDependencies": {
22
+ "@types/node": "^20.0.0",
23
+ "tsup": "^8.0.0",
24
+ "typescript": "^5.0.0"
25
+ }
26
+ }
package/src/index.ts ADDED
@@ -0,0 +1,56 @@
1
+ // Re-export all schemas
2
+ export {
3
+ ProjectStructureSchema,
4
+ MarketingSiteSchema,
5
+ AuthProviderSchema,
6
+ AnalyticsProviderSchema,
7
+ UploadsProviderSchema,
8
+ ComponentLibrarySchema,
9
+ StyleVariantSchema,
10
+ BaseColorSchema,
11
+ ThemeColorSchema,
12
+ MenuAccentSchema,
13
+ IconLibrarySchema,
14
+ FontFamilySchema,
15
+ BorderRadiusSchema,
16
+ SpacingScaleSchema,
17
+ PackageManagerSchema,
18
+ AddonSchema,
19
+ DesignSystemConfigSchema,
20
+ AuthConfigSchema,
21
+ IntegrationsConfigSchema,
22
+ ProjectConfigSchema,
23
+ CLIInputSchema,
24
+ DEFAULT_CONFIG,
25
+ } from './schemas.js'
26
+
27
+ // Re-export all types
28
+ export type {
29
+ ProjectStructure,
30
+ MarketingSite,
31
+ AuthProvider,
32
+ AnalyticsProvider,
33
+ UploadsProvider,
34
+ ComponentLibrary,
35
+ StyleVariant,
36
+ BaseColor,
37
+ ThemeColor,
38
+ MenuAccent,
39
+ IconLibrary,
40
+ FontFamily,
41
+ BorderRadius,
42
+ SpacingScale,
43
+ PackageManager,
44
+ Addon,
45
+ DesignSystemConfig,
46
+ AuthConfig,
47
+ IntegrationsConfig,
48
+ ProjectConfig,
49
+ CLIInput,
50
+ VirtualFile,
51
+ VirtualDirectory,
52
+ VirtualNode,
53
+ VirtualFileTree,
54
+ GeneratorOptions,
55
+ GeneratorResult,
56
+ } from './types.js'
package/src/schemas.ts ADDED
@@ -0,0 +1,191 @@
1
+ import { z } from 'zod'
2
+
3
+ // Project structure
4
+ export const ProjectStructureSchema = z.enum(['standalone', 'monorepo'])
5
+
6
+ // Marketing site options
7
+ export const MarketingSiteSchema = z.enum(['none', 'nextjs', 'payload'])
8
+
9
+ // Auth providers (OAuth)
10
+ export const AuthProviderSchema = z.enum([
11
+ 'github',
12
+ 'google',
13
+ 'discord',
14
+ 'twitter',
15
+ 'apple',
16
+ 'microsoft',
17
+ 'linkedin',
18
+ ])
19
+
20
+ // Analytics providers
21
+ export const AnalyticsProviderSchema = z.enum(['none', 'posthog', 'vercel'])
22
+
23
+ // Upload providers
24
+ export const UploadsProviderSchema = z.enum([
25
+ 'none',
26
+ 'uploadthing',
27
+ 's3',
28
+ 'vercel-blob',
29
+ ])
30
+
31
+ // Component library (shadcn style)
32
+ export const ComponentLibrarySchema = z.enum(['base-ui', 'radix'])
33
+
34
+ // Style variant
35
+ export const StyleVariantSchema = z.enum(['default', 'new-york'])
36
+
37
+ // Base color
38
+ export const BaseColorSchema = z.enum(['neutral', 'gray', 'zinc', 'slate', 'stone'])
39
+
40
+ // Theme color
41
+ export const ThemeColorSchema = z.enum([
42
+ 'zinc',
43
+ 'slate',
44
+ 'stone',
45
+ 'gray',
46
+ 'neutral',
47
+ 'red',
48
+ 'rose',
49
+ 'orange',
50
+ 'green',
51
+ 'blue',
52
+ 'yellow',
53
+ 'violet',
54
+ ])
55
+
56
+ // Menu accent
57
+ export const MenuAccentSchema = z.enum(['none', 'muted', 'primary'])
58
+
59
+ // Icon library
60
+ export const IconLibrarySchema = z.enum(['lucide', 'hugeicons'])
61
+
62
+ // Font family
63
+ export const FontFamilySchema = z.enum(['geist', 'inter', 'system'])
64
+
65
+ // Border radius
66
+ export const BorderRadiusSchema = z.enum(['0', '0.3', '0.5', '0.75', '1.0'])
67
+
68
+ // Spacing scale
69
+ export const SpacingScaleSchema = z.enum(['default', 'compact', 'comfortable'])
70
+
71
+ // Package manager
72
+ export const PackageManagerSchema = z.enum(['pnpm', 'npm', 'bun'])
73
+
74
+ // Addons
75
+ export const AddonSchema = z.enum([
76
+ 'biome',
77
+ 'husky',
78
+ 'turborepo',
79
+ 'playwright',
80
+ 'vitest',
81
+ 'rate-limiting',
82
+ 'monitoring',
83
+ ])
84
+
85
+ // Design system configuration
86
+ export const DesignSystemConfigSchema = z.object({
87
+ componentLibrary: ComponentLibrarySchema,
88
+ styleVariant: StyleVariantSchema,
89
+ baseColor: BaseColorSchema,
90
+ themeColor: ThemeColorSchema,
91
+ menuAccent: MenuAccentSchema,
92
+ iconLibrary: IconLibrarySchema,
93
+ headingFont: FontFamilySchema,
94
+ bodyFont: FontFamilySchema,
95
+ borderRadius: BorderRadiusSchema,
96
+ spacingScale: SpacingScaleSchema,
97
+ })
98
+
99
+ // Auth configuration
100
+ export const AuthConfigSchema = z.object({
101
+ providers: z.array(AuthProviderSchema),
102
+ organizations: z.boolean(),
103
+ })
104
+
105
+ // Integrations configuration
106
+ export const IntegrationsConfigSchema = z.object({
107
+ analytics: AnalyticsProviderSchema,
108
+ uploads: UploadsProviderSchema,
109
+ })
110
+
111
+ // Complete project configuration
112
+ export const ProjectConfigSchema = z.object({
113
+ // Basic info
114
+ projectName: z.string(),
115
+ targetDir: z.string(),
116
+
117
+ // Structure
118
+ structure: ProjectStructureSchema,
119
+ marketingSite: MarketingSiteSchema,
120
+
121
+ // Design system
122
+ shadcn: DesignSystemConfigSchema,
123
+
124
+ // Auth
125
+ auth: AuthConfigSchema,
126
+
127
+ // Integrations
128
+ integrations: IntegrationsConfigSchema,
129
+
130
+ // Addons
131
+ addons: z.array(AddonSchema),
132
+
133
+ // Setup options
134
+ packageManager: PackageManagerSchema,
135
+ })
136
+
137
+ // CLI input (what user provides, before defaults are applied)
138
+ export const CLIInputSchema = z.object({
139
+ projectName: z.string().optional(),
140
+ structure: ProjectStructureSchema.optional(),
141
+ marketingSite: MarketingSiteSchema.optional(),
142
+ componentLibrary: ComponentLibrarySchema.optional(),
143
+ styleVariant: StyleVariantSchema.optional(),
144
+ baseColor: BaseColorSchema.optional(),
145
+ themeColor: ThemeColorSchema.optional(),
146
+ menuAccent: MenuAccentSchema.optional(),
147
+ iconLibrary: IconLibrarySchema.optional(),
148
+ headingFont: FontFamilySchema.optional(),
149
+ bodyFont: FontFamilySchema.optional(),
150
+ borderRadius: BorderRadiusSchema.optional(),
151
+ spacingScale: SpacingScaleSchema.optional(),
152
+ authProviders: z.array(AuthProviderSchema).optional(),
153
+ organizations: z.boolean().optional(),
154
+ analytics: AnalyticsProviderSchema.optional(),
155
+ uploads: UploadsProviderSchema.optional(),
156
+ addons: z.array(AddonSchema).optional(),
157
+ git: z.boolean().optional(),
158
+ packageManager: PackageManagerSchema.optional(),
159
+ install: z.boolean().optional(),
160
+ yes: z.boolean().optional(), // Skip prompts with defaults
161
+ })
162
+
163
+ // Default configuration
164
+ export const DEFAULT_CONFIG: z.infer<typeof ProjectConfigSchema> = {
165
+ projectName: 'my-kofi-app',
166
+ targetDir: '',
167
+ structure: 'standalone',
168
+ marketingSite: 'none',
169
+ shadcn: {
170
+ componentLibrary: 'base-ui',
171
+ styleVariant: 'default',
172
+ baseColor: 'neutral',
173
+ themeColor: 'zinc',
174
+ menuAccent: 'muted',
175
+ iconLibrary: 'hugeicons',
176
+ headingFont: 'geist',
177
+ bodyFont: 'geist',
178
+ borderRadius: '0.5',
179
+ spacingScale: 'default',
180
+ },
181
+ auth: {
182
+ providers: ['github', 'google'],
183
+ organizations: false,
184
+ },
185
+ integrations: {
186
+ analytics: 'none',
187
+ uploads: 'none',
188
+ },
189
+ addons: [],
190
+ packageManager: 'pnpm',
191
+ }
package/src/types.ts ADDED
@@ -0,0 +1,84 @@
1
+ import type { z } from 'zod'
2
+ import type {
3
+ ProjectStructureSchema,
4
+ MarketingSiteSchema,
5
+ AuthProviderSchema,
6
+ AnalyticsProviderSchema,
7
+ UploadsProviderSchema,
8
+ ComponentLibrarySchema,
9
+ StyleVariantSchema,
10
+ BaseColorSchema,
11
+ ThemeColorSchema,
12
+ MenuAccentSchema,
13
+ IconLibrarySchema,
14
+ FontFamilySchema,
15
+ BorderRadiusSchema,
16
+ SpacingScaleSchema,
17
+ PackageManagerSchema,
18
+ AddonSchema,
19
+ DesignSystemConfigSchema,
20
+ AuthConfigSchema,
21
+ IntegrationsConfigSchema,
22
+ ProjectConfigSchema,
23
+ CLIInputSchema,
24
+ } from './schemas.js'
25
+
26
+ // Inferred types from Zod schemas
27
+ export type ProjectStructure = z.infer<typeof ProjectStructureSchema>
28
+ export type MarketingSite = z.infer<typeof MarketingSiteSchema>
29
+ export type AuthProvider = z.infer<typeof AuthProviderSchema>
30
+ export type AnalyticsProvider = z.infer<typeof AnalyticsProviderSchema>
31
+ export type UploadsProvider = z.infer<typeof UploadsProviderSchema>
32
+ export type ComponentLibrary = z.infer<typeof ComponentLibrarySchema>
33
+ export type StyleVariant = z.infer<typeof StyleVariantSchema>
34
+ export type BaseColor = z.infer<typeof BaseColorSchema>
35
+ export type ThemeColor = z.infer<typeof ThemeColorSchema>
36
+ export type MenuAccent = z.infer<typeof MenuAccentSchema>
37
+ export type IconLibrary = z.infer<typeof IconLibrarySchema>
38
+ export type FontFamily = z.infer<typeof FontFamilySchema>
39
+ export type BorderRadius = z.infer<typeof BorderRadiusSchema>
40
+ export type SpacingScale = z.infer<typeof SpacingScaleSchema>
41
+ export type PackageManager = z.infer<typeof PackageManagerSchema>
42
+ export type Addon = z.infer<typeof AddonSchema>
43
+ export type DesignSystemConfig = z.infer<typeof DesignSystemConfigSchema>
44
+ export type AuthConfig = z.infer<typeof AuthConfigSchema>
45
+ export type IntegrationsConfig = z.infer<typeof IntegrationsConfigSchema>
46
+ export type ProjectConfig = z.infer<typeof ProjectConfigSchema>
47
+ export type CLIInput = z.infer<typeof CLIInputSchema>
48
+
49
+ // Virtual filesystem types
50
+ export interface VirtualFile {
51
+ type: 'file'
52
+ path: string
53
+ name: string
54
+ content: string | Buffer
55
+ extension: string
56
+ sourcePath?: string // For binary files
57
+ }
58
+
59
+ export interface VirtualDirectory {
60
+ type: 'directory'
61
+ path: string
62
+ name: string
63
+ children: VirtualNode[]
64
+ }
65
+
66
+ export type VirtualNode = VirtualFile | VirtualDirectory
67
+
68
+ export interface VirtualFileTree {
69
+ root: VirtualDirectory
70
+ fileCount: number
71
+ directoryCount: number
72
+ config: ProjectConfig
73
+ }
74
+
75
+ // Generator types
76
+ export interface GeneratorOptions {
77
+ config: ProjectConfig
78
+ }
79
+
80
+ export interface GeneratorResult {
81
+ tree: VirtualFileTree
82
+ success: boolean
83
+ errors?: string[]
84
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "declaration": true,
10
+ "outDir": "./dist",
11
+ "rootDir": "./src"
12
+ },
13
+ "include": ["src/**/*"],
14
+ "exclude": ["node_modules", "dist"]
15
+ }