1- " use client" ;
1+ ' use client' ;
22
3- import { useState } from " react" ;
4- import { ClientDocsKitCode } from " @/components/ui/docskit/code.client-highlight" ;
5- import { cn } from " @/lib/utils" ;
3+ import { useState } from ' react' ;
4+ import { ClientDocsKitCode } from ' @/components/ui/docskit/code.client-highlight' ;
5+ import { cn } from ' @/lib/utils' ;
66
77type Variant = {
88 id : string ;
@@ -18,12 +18,12 @@ type Category = {
1818
1919const categories : Category [ ] = [
2020 {
21- id : " cli" ,
22- label : " CLI" ,
21+ id : ' cli' ,
22+ label : ' CLI' ,
2323 variants : [
2424 {
25- id : " scan" ,
26- label : " Scan a package" ,
25+ id : ' scan' ,
26+ label : ' Scan a package' ,
2727 code : {
2828 value : `$ drift scan --min 80
2929
@@ -35,13 +35,13 @@ const categories: Category[] = [
3535 Lint 0 issues
3636
3737 ok Scan passed` ,
38- lang : " bash" ,
39- meta : " Terminal -c" ,
38+ lang : ' bash' ,
39+ meta : ' Terminal -c' ,
4040 } ,
4141 } ,
4242 {
43- id : " scan-all" ,
44- label : " Scan a monorepo" ,
43+ id : ' scan-all' ,
44+ label : ' Scan a monorepo' ,
4545 code : {
4646 value : `$ drift scan --all --min 80
4747
@@ -56,13 +56,13 @@ const categories: Category[] = [
5656 Skipped 2 private packages
5757
5858 ✗ Scan failed — minimum health 80` ,
59- lang : " bash" ,
60- meta : " Terminal -c" ,
59+ lang : ' bash' ,
60+ meta : ' Terminal -c' ,
6161 } ,
6262 } ,
6363 {
64- id : " examples" ,
65- label : " Validate examples" ,
64+ id : ' examples' ,
65+ label : ' Validate examples' ,
6666 code : {
6767 value : `$ drift examples
6868
@@ -80,13 +80,13 @@ const categories: Category[] = [
8080 ... +28 more
8181
8282 Tip: drift examples --typecheck to compile-check examples` ,
83- lang : " bash" ,
84- meta : " Terminal -c" ,
83+ lang : ' bash' ,
84+ meta : ' Terminal -c' ,
8585 } ,
8686 } ,
8787 {
88- id : "ci" ,
89- label : " CI pipeline checks" ,
88+ id : 'ci' ,
89+ label : ' CI pipeline checks' ,
9090 code : {
9191 value : `$ drift ci
9292
@@ -100,19 +100,19 @@ const categories: Category[] = [
100100 @driftdev/core 70 96% 0 ok
101101
102102 ok All checks passed` ,
103- lang : " bash" ,
104- meta : " Terminal -c" ,
103+ lang : ' bash' ,
104+ meta : ' Terminal -c' ,
105105 } ,
106106 } ,
107107 ] ,
108108 } ,
109109 {
110- id : " agent" ,
111- label : " Agent" ,
110+ id : ' agent' ,
111+ label : ' Agent' ,
112112 variants : [
113113 {
114- id : " drift" ,
115- label : " Full monorepo audit" ,
114+ id : ' drift' ,
115+ label : ' Full monorepo audit' ,
116116 code : {
117117 value : `$ /drift
118118
@@ -130,13 +130,13 @@ const categories: Category[] = [
130130 /drift enrich --cwd packages/action
131131
132132✻ Cooked for 47s` ,
133- lang : " bash" ,
134- meta : " Claude Code -c" ,
133+ lang : ' bash' ,
134+ meta : ' Claude Code -c' ,
135135 } ,
136136 } ,
137137 {
138- id : " enrich" ,
139- label : " Add missing JSDoc" ,
138+ id : ' enrich' ,
139+ label : ' Add missing JSDoc' ,
140140 code : {
141141 value : `$ /drift enrich --cwd packages/shared
142142
@@ -156,13 +156,13 @@ const categories: Category[] = [
156156 Coverage 9% → 11%
157157
158158✻ Cooked for 2m 14s` ,
159- lang : " bash" ,
160- meta : " Claude Code -c" ,
159+ lang : ' bash' ,
160+ meta : ' Claude Code -c' ,
161161 } ,
162162 } ,
163163 {
164- id : " fix" ,
165- label : " Fix stale signatures" ,
164+ id : ' fix' ,
165+ label : ' Fix stale signatures' ,
166166 code : {
167167 value : `$ /drift fix
168168
@@ -183,19 +183,19 @@ const categories: Category[] = [
183183 ok 0 issues — all fixed
184184
185185✻ Cooked for 38s` ,
186- lang : " bash" ,
187- meta : " Claude Code -c" ,
186+ lang : ' bash' ,
187+ meta : ' Claude Code -c' ,
188188 } ,
189189 } ,
190190 ] ,
191191 } ,
192192 {
193- id : " sdk" ,
194- label : " SDK" ,
193+ id : ' sdk' ,
194+ label : ' SDK' ,
195195 variants : [
196196 {
197- id : " analyze" ,
198- label : " Analyze & detect drift" ,
197+ id : ' analyze' ,
198+ label : ' Analyze & detect drift' ,
199199 code : {
200200 value : `import { buildDriftSpec, computeDrift } from '@driftdev/sdk'
201201
@@ -205,13 +205,13 @@ const drift = computeDrift(spec)
205205for (const [name, issues] of drift.exports) {
206206 console.log(\`\${name}: \${issues.length} issues\`)
207207}` ,
208- lang : " typescript" ,
209- meta : " analyze.ts -cn" ,
208+ lang : ' typescript' ,
209+ meta : ' analyze.ts -cn' ,
210210 } ,
211211 } ,
212212 {
213- id : " health" ,
214- label : " Full health check" ,
213+ id : ' health' ,
214+ label : ' Full health check' ,
215215 code : {
216216 value : `import { buildDriftSpec, computeDrift,
217217 computeHealth, validateExamples } from '@driftdev/sdk'
@@ -225,13 +225,13 @@ const examples = await validateExamples(spec.exports, {
225225const { score, completeness, accuracy } = computeHealth({
226226 spec, drift, examples,
227227})` ,
228- lang : " typescript" ,
229- meta : " health.ts -cn" ,
228+ lang : ' typescript' ,
229+ meta : ' health.ts -cn' ,
230230 } ,
231231 } ,
232232 {
233- id : " diff" ,
234- label : " Diff specs & detect breaking" ,
233+ id : ' diff' ,
234+ label : ' Diff specs & detect breaking' ,
235235 code : {
236236 value : `import { diffSpecWithDocs, parseMarkdownFiles } from '@driftdev/sdk'
237237
@@ -250,8 +250,8 @@ if (diff.docsImpact?.impactedFiles.length) {
250250 console.log('Docs needing updates:')
251251 diff.docsImpact.impactedFiles.forEach(f => console.log(\` \${f.path}\`))
252252}` ,
253- lang : " typescript" ,
254- meta : " diff.ts -cn" ,
253+ lang : ' typescript' ,
254+ meta : ' diff.ts -cn' ,
255255 } ,
256256 } ,
257257 ] ,
@@ -273,9 +273,7 @@ export function CodeExamples() {
273273 return (
274274 < section id = "overview" className = "relative z-10 mx-auto max-w-3xl px-6 py-16 scroll-mt-8" >
275275 < div className = "mb-8 text-center" >
276- < h2 className = "font-serif text-4xl tracking-tight text-text sm:text-5xl" >
277- Overview
278- </ h2 >
276+ < h2 className = "font-serif text-4xl tracking-tight text-text sm:text-5xl" > Overview</ h2 >
279277 < p className = "mx-auto mt-3 max-w-lg text-base text-text-muted" >
280278 Everything you need to keep your documentation in sync with your code.
281279 </ p >
@@ -289,10 +287,10 @@ export function CodeExamples() {
289287 type = "button"
290288 onClick = { ( ) => handleCategoryChange ( i ) }
291289 className = { cn (
292- " flex-1 rounded-md px-3 py-1.5 text-sm font-medium transition-all" ,
290+ ' flex-1 rounded-md px-3 py-1.5 text-sm font-medium transition-all' ,
293291 categoryIndex === i
294- ? " bg-card-bg text-text shadow-sm"
295- : " text-text-muted hover:text-text"
292+ ? ' bg-card-bg text-text shadow-sm'
293+ : ' text-text-muted hover:text-text' ,
296294 ) }
297295 >
298296 { cat . label }
@@ -302,10 +300,7 @@ export function CodeExamples() {
302300
303301 { /* Code block */ }
304302 < div className = "min-w-0 text-[13px] leading-[1.5] [&>div]:!my-0" >
305- < ClientDocsKitCode
306- key = { `${ category . id } -${ variant . id } ` }
307- codeblock = { variant . code }
308- />
303+ < ClientDocsKitCode key = { `${ category . id } -${ variant . id } ` } codeblock = { variant . code } />
309304 </ div >
310305
311306 { /* Variant bubbles */ }
@@ -316,10 +311,10 @@ export function CodeExamples() {
316311 type = "button"
317312 onClick = { ( ) => setVariantIndex ( i ) }
318313 className = { cn (
319- " rounded-full border px-3 py-1 text-xs font-medium transition-all" ,
314+ ' rounded-full border px-3 py-1 text-xs font-medium transition-all' ,
320315 variantIndex === i
321- ? " border-cta/40 bg-card-bg text-text"
322- : " border-border bg-page-bg text-text-muted hover:bg-card-bg/60"
316+ ? ' border-cta/40 bg-card-bg text-text'
317+ : ' border-border bg-page-bg text-text-muted hover:bg-card-bg/60' ,
323318 ) }
324319 >
325320 { v . label }
0 commit comments