@kuckit/landing-module 4.0.5 → 5.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.
- package/dist/client/components/LandingPage.d.ts +6 -0
- package/dist/client/components/LandingPage.js +206 -0
- package/dist/client/components/ModulesPage.d.ts +6 -0
- package/dist/client/components/ModulesPage.js +326 -0
- package/dist/client/components/faq.js +170 -0
- package/dist/client/components/features.js +624 -0
- package/dist/client/components/hero.js +239 -0
- package/dist/client/components/pricing.js +111 -0
- package/dist/client/components/terminal-animation.js +100 -0
- package/dist/client/components/ui/glare-card.js +375 -0
- package/dist/client/components/ui/utils.js +10 -0
- package/dist/client/index.d.ts +3 -9
- package/dist/client/index.js +3 -1751
- package/dist/server/module.d.ts +1 -2
- package/dist/server/module.js +6 -79
- package/dist/server/repository/waitlist.repository.js +22 -0
- package/dist/server/router/waitlist.router.js +19 -0
- package/dist/server/schema/index.d.ts +2 -0
- package/dist/server/schema/index.js +3 -0
- package/dist/server/schema/waitlist.d.ts +99 -0
- package/dist/server/schema/waitlist.js +13 -0
- package/dist/server/use-cases/join-waitlist.js +32 -0
- package/package.json +12 -7
- package/dist/client/index.js.map +0 -1
- package/dist/server/module.js.map +0 -1
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { TerminalAnimation } from "./terminal-animation.js";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/client/components/hero.tsx
|
|
6
|
+
const heroCommands = [{
|
|
7
|
+
input: "bunx create-kuckit-app my-saas",
|
|
8
|
+
output: [
|
|
9
|
+
"Creating new Kuckit project...",
|
|
10
|
+
"",
|
|
11
|
+
"✓ Cloned template",
|
|
12
|
+
"✓ Installed dependencies",
|
|
13
|
+
"✓ Set up database",
|
|
14
|
+
"",
|
|
15
|
+
"Run: cd my-saas && bun run dev"
|
|
16
|
+
]
|
|
17
|
+
}, {
|
|
18
|
+
input: "kuckit add @kuckit/payments-module",
|
|
19
|
+
output: [
|
|
20
|
+
"Installing @kuckit/payments-module...",
|
|
21
|
+
"",
|
|
22
|
+
"✓ Package installed",
|
|
23
|
+
"✓ Server module wired",
|
|
24
|
+
"✓ Client routes added",
|
|
25
|
+
"",
|
|
26
|
+
"Stripe + Polar ready!"
|
|
27
|
+
]
|
|
28
|
+
}];
|
|
29
|
+
function Hero() {
|
|
30
|
+
const [copied, setCopied] = useState(false);
|
|
31
|
+
const copyCommand = () => {
|
|
32
|
+
navigator.clipboard.writeText("bunx create-kuckit-app my-app");
|
|
33
|
+
setCopied(true);
|
|
34
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
37
|
+
className: "relative min-h-screen",
|
|
38
|
+
children: [/* @__PURE__ */ jsx("nav", {
|
|
39
|
+
className: "relative z-20 border-b border-border",
|
|
40
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "max-w-7xl mx-auto flex items-center justify-between h-16 px-8",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", {
|
|
44
|
+
className: "flex items-center gap-3",
|
|
45
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
46
|
+
className: "w-8 h-8",
|
|
47
|
+
viewBox: "0 0 512 512",
|
|
48
|
+
fill: "none",
|
|
49
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx("polygon", {
|
|
52
|
+
points: "256,64 384,144 384,304 256,224",
|
|
53
|
+
fill: "#3D3A39"
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx("polygon", {
|
|
56
|
+
points: "256,64 128,144 128,304 256,224",
|
|
57
|
+
fill: "#5C5855"
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsx("polygon", {
|
|
60
|
+
points: "128,144 256,224 384,144 256,64",
|
|
61
|
+
fill: "#A49D9A"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsx("polygon", {
|
|
64
|
+
points: "256,224 352,280 352,392 256,336",
|
|
65
|
+
fill: "#D15010"
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ jsx("polygon", {
|
|
68
|
+
points: "256,224 160,280 160,392 256,336",
|
|
69
|
+
fill: "#EE6018"
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsx("polygon", {
|
|
72
|
+
points: "160,280 256,336 352,280 256,224",
|
|
73
|
+
fill: "#EF6F2E"
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
77
|
+
className: "text-foreground font-medium tracking-tight",
|
|
78
|
+
children: "Kuckit"
|
|
79
|
+
})]
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ jsxs("div", {
|
|
82
|
+
className: "hidden md:flex items-center gap-8",
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx("a", {
|
|
85
|
+
href: "/docs",
|
|
86
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
|
|
87
|
+
children: "Docs"
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx("a", {
|
|
90
|
+
href: "/modules",
|
|
91
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
|
|
92
|
+
children: "Modules"
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsx("a", {
|
|
95
|
+
href: "#pricing",
|
|
96
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
|
|
97
|
+
children: "Pricing"
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsxs("div", {
|
|
102
|
+
className: "flex items-center gap-3",
|
|
103
|
+
children: [/* @__PURE__ */ jsx("a", {
|
|
104
|
+
href: "/login",
|
|
105
|
+
className: "text-sm text-muted-foreground hover:text-foreground transition-colors px-4 py-2",
|
|
106
|
+
children: "Sign in"
|
|
107
|
+
}), /* @__PURE__ */ jsx("a", {
|
|
108
|
+
href: "/docs/getting-started",
|
|
109
|
+
className: "text-sm bg-primary text-primary-foreground px-4 py-2 hover:bg-primary/90 transition-colors",
|
|
110
|
+
children: "Get Started"
|
|
111
|
+
})]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
})
|
|
115
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
116
|
+
className: "relative z-10 max-w-7xl mx-auto px-8 pt-24 pb-32",
|
|
117
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
118
|
+
className: "grid lg:grid-cols-12 gap-12 lg:gap-16 items-center",
|
|
119
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
120
|
+
className: "lg:col-span-7",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsxs("div", {
|
|
123
|
+
className: "flex items-center gap-4 mb-8",
|
|
124
|
+
children: [/* @__PURE__ */ jsx("div", { className: "h-px w-12 bg-primary" }), /* @__PURE__ */ jsx("span", {
|
|
125
|
+
className: "text-xs text-primary tracking-[0.25em] uppercase font-medium",
|
|
126
|
+
children: "Vibe coding ain't fun when you're stuck"
|
|
127
|
+
})]
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ jsxs("h1", {
|
|
130
|
+
className: "mb-8",
|
|
131
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
132
|
+
className: "block text-4xl md:text-5xl lg:text-6xl font-light text-foreground tracking-[-0.03em] leading-[1.1]",
|
|
133
|
+
children: "You don't need more prompts."
|
|
134
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
135
|
+
className: "block text-4xl md:text-5xl lg:text-6xl font-light text-primary tracking-[-0.03em] leading-[1.1] mt-2",
|
|
136
|
+
children: "You need a foundation."
|
|
137
|
+
})]
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ jsx("p", {
|
|
140
|
+
className: "text-lg md:text-xl text-muted-foreground max-w-xl leading-relaxed mb-12",
|
|
141
|
+
children: "Vibe coding builds fast. We build right. Ship in hours."
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ jsx("div", {
|
|
144
|
+
className: "flex flex-col sm:flex-row items-start gap-4 mb-16",
|
|
145
|
+
children: /* @__PURE__ */ jsxs("a", {
|
|
146
|
+
href: "/docs/getting-started",
|
|
147
|
+
className: "group inline-flex items-center gap-3 px-6 py-4 bg-primary text-primary-foreground font-medium hover:bg-primary/90 transition-all",
|
|
148
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Get Unstuck" }), /* @__PURE__ */ jsx("svg", {
|
|
149
|
+
className: "w-4 h-4 group-hover:translate-x-1 transition-transform",
|
|
150
|
+
fill: "none",
|
|
151
|
+
stroke: "currentColor",
|
|
152
|
+
viewBox: "0 0 24 24",
|
|
153
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
154
|
+
strokeLinecap: "round",
|
|
155
|
+
strokeLinejoin: "round",
|
|
156
|
+
strokeWidth: 2,
|
|
157
|
+
d: "M17 8l4 4m0 0l-4 4m4-4H3"
|
|
158
|
+
})
|
|
159
|
+
})]
|
|
160
|
+
})
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ jsxs("div", {
|
|
163
|
+
className: "inline-block",
|
|
164
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
165
|
+
className: "text-xs text-muted-foreground tracking-[0.15em] uppercase mb-3",
|
|
166
|
+
children: "Quick Start"
|
|
167
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
168
|
+
onClick: copyCommand,
|
|
169
|
+
className: "group flex items-center gap-4 px-5 py-4 bg-card border border-border hover:border-primary/50 transition-colors font-mono text-sm",
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ jsx("span", {
|
|
172
|
+
className: "text-primary",
|
|
173
|
+
children: "$"
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ jsx("code", {
|
|
176
|
+
className: "text-foreground",
|
|
177
|
+
children: "bunx create-kuckit-app my-app"
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ jsx("span", {
|
|
180
|
+
className: "text-muted-foreground group-hover:text-primary transition-colors ml-4",
|
|
181
|
+
children: copied ? /* @__PURE__ */ jsx("svg", {
|
|
182
|
+
className: "w-4 h-4",
|
|
183
|
+
fill: "none",
|
|
184
|
+
stroke: "currentColor",
|
|
185
|
+
viewBox: "0 0 24 24",
|
|
186
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
187
|
+
strokeLinecap: "round",
|
|
188
|
+
strokeLinejoin: "round",
|
|
189
|
+
strokeWidth: 2,
|
|
190
|
+
d: "M5 13l4 4L19 7"
|
|
191
|
+
})
|
|
192
|
+
}) : /* @__PURE__ */ jsx("svg", {
|
|
193
|
+
className: "w-4 h-4",
|
|
194
|
+
fill: "none",
|
|
195
|
+
stroke: "currentColor",
|
|
196
|
+
viewBox: "0 0 24 24",
|
|
197
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
198
|
+
strokeLinecap: "round",
|
|
199
|
+
strokeLinejoin: "round",
|
|
200
|
+
strokeWidth: 2,
|
|
201
|
+
d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
})]
|
|
207
|
+
})
|
|
208
|
+
]
|
|
209
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
210
|
+
className: "lg:col-span-5 relative",
|
|
211
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
212
|
+
className: "relative",
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -inset-4 bg-primary/5 blur-2xl rounded-lg" }),
|
|
215
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -top-4 -left-4 w-8 h-8 border-l-2 border-t-2 border-primary/60" }),
|
|
216
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -top-4 -right-4 w-8 h-8 border-r-2 border-t-2 border-primary/60" }),
|
|
217
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-4 -left-4 w-8 h-8 border-l-2 border-b-2 border-primary/60" }),
|
|
218
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-4 -right-4 w-8 h-8 border-r-2 border-b-2 border-primary/60" }),
|
|
219
|
+
/* @__PURE__ */ jsxs("div", {
|
|
220
|
+
className: "absolute -top-8 left-0 flex items-center gap-2",
|
|
221
|
+
children: [/* @__PURE__ */ jsx("div", { className: "w-2 h-2 bg-primary" }), /* @__PURE__ */ jsx("span", {
|
|
222
|
+
className: "text-[10px] text-muted-foreground tracking-[0.2em] uppercase",
|
|
223
|
+
children: "Live Demo"
|
|
224
|
+
})]
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ jsx(TerminalAnimation, {
|
|
227
|
+
commands: heroCommands,
|
|
228
|
+
minHeight: "min-h-[320px]"
|
|
229
|
+
})
|
|
230
|
+
]
|
|
231
|
+
})
|
|
232
|
+
})]
|
|
233
|
+
})
|
|
234
|
+
})]
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
//#endregion
|
|
239
|
+
export { Hero };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { GlareCard } from "./ui/glare-card.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Check, Zap } from "lucide-react";
|
|
4
|
+
|
|
5
|
+
//#region src/client/components/pricing.tsx
|
|
6
|
+
const product = {
|
|
7
|
+
name: "Kuckit",
|
|
8
|
+
price: "249",
|
|
9
|
+
description: "Stop debugging. Start launching. Everything you need to escape the vibe coding trap.",
|
|
10
|
+
features: [
|
|
11
|
+
"Production-ready architecture",
|
|
12
|
+
"Auth, payments, dashboards included",
|
|
13
|
+
"Code you can actually understand",
|
|
14
|
+
"Deploy in hours, not weeks",
|
|
15
|
+
"Support when you get stuck"
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
function Pricing() {
|
|
19
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
20
|
+
id: "pricing",
|
|
21
|
+
className: "relative border-t border-border scroll-mt-16",
|
|
22
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: "max-w-7xl mx-auto px-8 py-16 border-b border-border",
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "flex items-center gap-4 mb-4",
|
|
27
|
+
children: [/* @__PURE__ */ jsx("div", { className: "h-px w-12 bg-primary" }), /* @__PURE__ */ jsx("span", {
|
|
28
|
+
className: "text-xs text-primary tracking-[0.25em] uppercase font-medium",
|
|
29
|
+
children: "One-time investment"
|
|
30
|
+
})]
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsx("h2", {
|
|
33
|
+
className: "text-4xl md:text-5xl font-light text-foreground tracking-[-0.03em]",
|
|
34
|
+
children: "Skip months of debugging"
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx("p", {
|
|
37
|
+
className: "mt-4 text-lg text-muted-foreground max-w-2xl",
|
|
38
|
+
children: "Pay once. Ship forever. No subscriptions, no surprises."
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: "max-w-7xl mx-auto px-8 py-16",
|
|
43
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "flex justify-center",
|
|
45
|
+
children: /* @__PURE__ */ jsxs(GlareCard, {
|
|
46
|
+
className: "flex flex-col p-8 min-h-[520px]",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsxs("div", {
|
|
49
|
+
className: "flex items-start justify-between mb-8",
|
|
50
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: "space-y-3",
|
|
52
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
53
|
+
className: "inline-flex items-center justify-center size-12 rounded-sm bg-primary/10 border border-primary/20",
|
|
54
|
+
children: /* @__PURE__ */ jsx(Zap, { className: "size-6 text-primary" })
|
|
55
|
+
}), /* @__PURE__ */ jsx("h3", {
|
|
56
|
+
className: "text-2xl font-normal text-foreground tracking-tight",
|
|
57
|
+
children: product.name
|
|
58
|
+
})]
|
|
59
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
60
|
+
className: "px-3 py-1.5 text-xs uppercase tracking-[0.15em] bg-primary/10 text-primary border border-primary/20",
|
|
61
|
+
children: "Popular"
|
|
62
|
+
})]
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "mb-8",
|
|
66
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
67
|
+
className: "flex items-baseline gap-1",
|
|
68
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: "text-sm text-muted-foreground",
|
|
70
|
+
children: "$"
|
|
71
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: "text-6xl font-light text-foreground tabular-nums tracking-tighter",
|
|
73
|
+
children: product.price
|
|
74
|
+
})]
|
|
75
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
76
|
+
className: "text-muted-foreground text-sm mt-3 tracking-wide",
|
|
77
|
+
children: "one-time payment"
|
|
78
|
+
})]
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ jsx("div", { className: "h-px bg-gradient-to-r from-transparent via-border to-transparent mb-8" }),
|
|
81
|
+
/* @__PURE__ */ jsx("p", {
|
|
82
|
+
className: "text-muted-foreground text-sm leading-relaxed mb-8",
|
|
83
|
+
children: product.description
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx("div", {
|
|
86
|
+
className: "space-y-3 mb-10 flex-grow",
|
|
87
|
+
children: product.features.map((feature) => /* @__PURE__ */ jsxs("div", {
|
|
88
|
+
className: "flex items-center gap-3",
|
|
89
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
90
|
+
className: "w-4 h-4 flex items-center justify-center",
|
|
91
|
+
children: /* @__PURE__ */ jsx(Check, { className: "w-3 h-3 text-primary" })
|
|
92
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
93
|
+
className: "text-sm text-foreground",
|
|
94
|
+
children: feature
|
|
95
|
+
})]
|
|
96
|
+
}, feature))
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx("a", {
|
|
99
|
+
href: "/billing",
|
|
100
|
+
className: "w-full py-4 text-sm font-medium tracking-wide transition-all duration-300 flex items-center justify-center gap-2 bg-primary text-primary-foreground hover:bg-primary/90",
|
|
101
|
+
children: "Get Started"
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
//#endregion
|
|
111
|
+
export { Pricing };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/components/terminal-animation.tsx
|
|
5
|
+
function TerminalAnimation({ commands, className = "", minHeight = "min-h-[280px]" }) {
|
|
6
|
+
const [activeCommand, setActiveCommand] = useState(0);
|
|
7
|
+
const [displayedLines, setDisplayedLines] = useState([]);
|
|
8
|
+
const [isTyping, setIsTyping] = useState(true);
|
|
9
|
+
const [typedInput, setTypedInput] = useState("");
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const command = commands[activeCommand];
|
|
12
|
+
if (!command) return;
|
|
13
|
+
let inputIndex = 0;
|
|
14
|
+
let outputIndex = 0;
|
|
15
|
+
let outputInterval = null;
|
|
16
|
+
setDisplayedLines([]);
|
|
17
|
+
setTypedInput("");
|
|
18
|
+
setIsTyping(true);
|
|
19
|
+
const inputInterval = setInterval(() => {
|
|
20
|
+
if (inputIndex <= command.input.length) {
|
|
21
|
+
setTypedInput(command.input.slice(0, inputIndex));
|
|
22
|
+
inputIndex++;
|
|
23
|
+
} else {
|
|
24
|
+
clearInterval(inputInterval);
|
|
25
|
+
setIsTyping(false);
|
|
26
|
+
outputInterval = setInterval(() => {
|
|
27
|
+
if (outputIndex < command.output.length) {
|
|
28
|
+
const line = command.output[outputIndex];
|
|
29
|
+
if (line !== void 0) setDisplayedLines((prev) => [...prev, line]);
|
|
30
|
+
outputIndex++;
|
|
31
|
+
} else {
|
|
32
|
+
if (outputInterval) clearInterval(outputInterval);
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
setActiveCommand((prev) => (prev + 1) % commands.length);
|
|
35
|
+
}, 3e3);
|
|
36
|
+
}
|
|
37
|
+
}, 100);
|
|
38
|
+
}
|
|
39
|
+
}, 50);
|
|
40
|
+
return () => {
|
|
41
|
+
clearInterval(inputInterval);
|
|
42
|
+
if (outputInterval) clearInterval(outputInterval);
|
|
43
|
+
};
|
|
44
|
+
}, [activeCommand, commands]);
|
|
45
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
46
|
+
className,
|
|
47
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "border border-border bg-background",
|
|
49
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "flex items-center justify-between px-4 py-3 border-b border-border bg-card",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: "flex items-center gap-2",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: "w-3 h-3 rounded-full bg-[hsl(var(--status-error)/0.8)]" }),
|
|
56
|
+
/* @__PURE__ */ jsx("div", { className: "w-3 h-3 rounded-full bg-[hsl(var(--status-warning)/0.8)]" }),
|
|
57
|
+
/* @__PURE__ */ jsx("div", { className: "w-3 h-3 rounded-full bg-[hsl(var(--status-success)/0.8)]" })
|
|
58
|
+
]
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsx("span", {
|
|
61
|
+
className: "text-xs text-muted-foreground font-mono",
|
|
62
|
+
children: "terminal"
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsx("div", { className: "w-16" })
|
|
65
|
+
]
|
|
66
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
67
|
+
className: `p-6 font-mono text-sm ${minHeight}`,
|
|
68
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: "flex items-center gap-2 mb-4",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: "text-primary",
|
|
73
|
+
children: "$"
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ jsx("span", {
|
|
76
|
+
className: "text-foreground",
|
|
77
|
+
children: typedInput
|
|
78
|
+
}),
|
|
79
|
+
isTyping && /* @__PURE__ */ jsx("span", { className: "w-2 h-5 bg-primary animate-pulse" })
|
|
80
|
+
]
|
|
81
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
82
|
+
className: "space-y-0.5",
|
|
83
|
+
children: displayedLines.map((line, index) => /* @__PURE__ */ jsx("div", {
|
|
84
|
+
className: `${line?.startsWith("✓") ? "text-[hsl(var(--status-success))]" : line?.includes("!") ? "text-foreground" : "text-muted-foreground"}`,
|
|
85
|
+
children: line || "\xA0"
|
|
86
|
+
}, index))
|
|
87
|
+
})]
|
|
88
|
+
})]
|
|
89
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
90
|
+
className: "flex justify-center gap-2 mt-6",
|
|
91
|
+
children: commands.map((_, index) => /* @__PURE__ */ jsx("button", {
|
|
92
|
+
onClick: () => setActiveCommand(index),
|
|
93
|
+
className: `h-1.5 transition-all ${index === activeCommand ? "bg-primary w-8" : "bg-muted hover:bg-muted-foreground/30 w-1.5"}`
|
|
94
|
+
}, index))
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
export { TerminalAnimation };
|