Skip to content

Commit b2f7afe

Browse files
committed
Format
1 parent 2dd36b6 commit b2f7afe

29 files changed

Lines changed: 1119 additions & 1115 deletions

components.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "new-york",
4-
"rsc": false,
5-
"tsx": true,
6-
"tailwind": {
7-
"config": "",
8-
"css": "styles/globals.css",
9-
"baseColor": "zinc",
10-
"cssVariables": true,
11-
"prefix": ""
12-
},
13-
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/utils",
16-
"ui": "@/components/ui",
17-
"lib": "@/lib",
18-
"hooks": "@/hooks"
19-
},
20-
"iconLibrary": "lucide"
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "styles/globals.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
2121
}

contents/blocks/feat/metadata.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
2-
"id": "feat",
3-
"name": "feat",
4-
"categories": [
5-
"header"
6-
],
7-
"author": "Yo"
8-
}
2+
"id": "feat",
3+
"name": "feat",
4+
"categories": ["header"],
5+
"author": "Yo"
6+
}
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
2-
"id": "feature-02",
3-
"name": "Feature 02",
4-
"categories": [
5-
"card",
6-
"feature",
7-
"showcase"
8-
],
9-
"author": "Windbase Team"
10-
}
2+
"id": "feature-02",
3+
"name": "Feature 02",
4+
"categories": ["card", "feature", "showcase"],
5+
"author": "Windbase Team"
6+
}
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
2-
"id": "hero-section",
3-
"name": "Hero Section",
4-
"categories": [
5-
"hero",
6-
"call-to-action"
7-
],
8-
"author": "Windbase Team"
9-
}
2+
"id": "hero-section",
3+
"name": "Hero Section",
4+
"categories": ["hero", "call-to-action"],
5+
"author": "Windbase Team"
6+
}
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
2-
"id": "landing-01",
3-
"name": "landing-01",
4-
"categories": [
5-
"landing"
6-
],
7-
"author": "Yo"
8-
}
2+
"id": "landing-01",
3+
"name": "landing-01",
4+
"categories": ["landing"],
5+
"author": "Yo"
6+
}

package.json

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
{
2-
"name": "bun-react-template",
3-
"version": "0.1.0",
4-
"private": true,
5-
"type": "module",
6-
"main": "src/index.tsx",
7-
"module": "src/index.tsx",
8-
"scripts": {
9-
"dev": "bun --hot src/index.tsx",
10-
"start": "NODE_ENV=production bun src/index.tsx",
11-
"build": "bun run build.ts",
12-
"build:components": "bun run src/utils/buildComponents.ts"
13-
},
14-
"dependencies": {
15-
"@codemirror/lang-html": "^6.4.9",
16-
"@codemirror/theme-one-dark": "^6.1.3",
17-
"@hookform/resolvers": "^4.1.0",
18-
"@radix-ui/react-dialog": "^1.1.14",
19-
"@radix-ui/react-icons": "^1.3.2",
20-
"@radix-ui/react-label": "^2.1.2",
21-
"@radix-ui/react-select": "^2.1.6",
22-
"@radix-ui/react-slot": "^1.2.3",
23-
"@radix-ui/react-tabs": "^1.1.12",
24-
"@uiw/react-codemirror": "^4.24.1",
25-
"bun-plugin-tailwind": "^0.0.14",
26-
"class-variance-authority": "^0.7.1",
27-
"clsx": "^2.1.1",
28-
"cmdk": "^1.1.1",
29-
"lucide-react": "^0.525.0",
30-
"playwright": "^1.54.1",
31-
"react": "^19",
32-
"react-dom": "^19",
33-
"react-hook-form": "^7.54.2",
34-
"react-router-dom": "^7.6.3",
35-
"tailwind-merge": "^3.0.1",
36-
"tailwindcss": "^4.0.6",
37-
"tailwindcss-animate": "^1.0.7",
38-
"zod": "^3.24.2"
39-
},
40-
"devDependencies": {
41-
"@biomejs/biome": "^2.1.1",
42-
"@types/bun": "latest",
43-
"@types/react": "^19",
44-
"@types/react-dom": "^19"
45-
}
2+
"name": "bun-react-template",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"main": "src/index.tsx",
7+
"module": "src/index.tsx",
8+
"scripts": {
9+
"dev": "bun --hot src/index.tsx",
10+
"start": "NODE_ENV=production bun src/index.tsx",
11+
"build": "bun run build.ts",
12+
"build:components": "bun run src/utils/buildComponents.ts"
13+
},
14+
"dependencies": {
15+
"@codemirror/lang-html": "^6.4.9",
16+
"@codemirror/theme-one-dark": "^6.1.3",
17+
"@hookform/resolvers": "^4.1.0",
18+
"@radix-ui/react-dialog": "^1.1.14",
19+
"@radix-ui/react-icons": "^1.3.2",
20+
"@radix-ui/react-label": "^2.1.2",
21+
"@radix-ui/react-select": "^2.1.6",
22+
"@radix-ui/react-slot": "^1.2.3",
23+
"@radix-ui/react-tabs": "^1.1.12",
24+
"@uiw/react-codemirror": "^4.24.1",
25+
"bun-plugin-tailwind": "^0.0.14",
26+
"class-variance-authority": "^0.7.1",
27+
"clsx": "^2.1.1",
28+
"cmdk": "^1.1.1",
29+
"lucide-react": "^0.525.0",
30+
"playwright": "^1.54.1",
31+
"react": "^19",
32+
"react-dom": "^19",
33+
"react-hook-form": "^7.54.2",
34+
"react-router-dom": "^7.6.3",
35+
"tailwind-merge": "^3.0.1",
36+
"tailwindcss": "^4.0.6",
37+
"tailwindcss-animate": "^1.0.7",
38+
"zod": "^3.24.2"
39+
},
40+
"devDependencies": {
41+
"@biomejs/biome": "^2.1.1",
42+
"@types/bun": "latest",
43+
"@types/react": "^19",
44+
"@types/react-dom": "^19"
45+
}
4646
}

src/APITester.tsx

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
1-
import React, { useRef, type FormEvent } from "react";
2-
import { Button } from "@/components/ui/button";
3-
import { Input } from "@/components/ui/input";
1+
import React, { useRef, type FormEvent } from 'react';
2+
import { Button } from '@/components/ui/button';
3+
import { Input } from '@/components/ui/input';
44
import {
5-
Select,
6-
SelectContent,
7-
SelectItem,
8-
SelectTrigger,
9-
SelectValue,
10-
} from "@/components/ui/select";
11-
import { cn } from "@/lib/utils";
5+
Select,
6+
SelectContent,
7+
SelectItem,
8+
SelectTrigger,
9+
SelectValue
10+
} from '@/components/ui/select';
11+
import { cn } from '@/lib/utils';
1212

1313
export function APITester() {
14-
const responseInputRef = useRef<HTMLTextAreaElement>(null);
14+
const responseInputRef = useRef<HTMLTextAreaElement>(null);
1515

16-
const testEndpoint = async (e: FormEvent<HTMLFormElement>) => {
17-
e.preventDefault();
16+
const testEndpoint = async (e: FormEvent<HTMLFormElement>) => {
17+
e.preventDefault();
1818

19-
try {
20-
const form = e.currentTarget;
21-
const formData = new FormData(form);
22-
const endpoint = formData.get("endpoint") as string;
23-
const url = new URL(endpoint, location.href);
24-
const method = formData.get("method") as string;
25-
const res = await fetch(url, { method });
19+
try {
20+
const form = e.currentTarget;
21+
const formData = new FormData(form);
22+
const endpoint = formData.get('endpoint') as string;
23+
const url = new URL(endpoint, location.href);
24+
const method = formData.get('method') as string;
25+
const res = await fetch(url, { method });
2626

27-
const data = await res.json();
28-
responseInputRef.current!.value = JSON.stringify(data, null, 2);
29-
} catch (error) {
30-
responseInputRef.current!.value = String(error);
31-
}
32-
};
27+
const data = await res.json();
28+
responseInputRef.current!.value = JSON.stringify(data, null, 2);
29+
} catch (error) {
30+
responseInputRef.current!.value = String(error);
31+
}
32+
};
3333

34-
return (
35-
<div className="mt-8 mx-auto w-full max-w-2xl text-left flex flex-col gap-4">
36-
<form
37-
onSubmit={testEndpoint}
38-
className="flex items-center gap-2 bg-card p-3 rounded-xl font-mono border border-input w-full"
39-
>
40-
<Select name="method" defaultValue="GET">
41-
<SelectTrigger className="w-[100px]">
42-
<SelectValue placeholder="Method" />
43-
</SelectTrigger>
44-
<SelectContent>
45-
<SelectItem value="GET">GET</SelectItem>
46-
<SelectItem value="PUT">PUT</SelectItem>
47-
</SelectContent>
48-
</Select>
34+
return (
35+
<div className="mt-8 mx-auto w-full max-w-2xl text-left flex flex-col gap-4">
36+
<form
37+
onSubmit={testEndpoint}
38+
className="flex items-center gap-2 bg-card p-3 rounded-xl font-mono border border-input w-full"
39+
>
40+
<Select name="method" defaultValue="GET">
41+
<SelectTrigger className="w-[100px]">
42+
<SelectValue placeholder="Method" />
43+
</SelectTrigger>
44+
<SelectContent>
45+
<SelectItem value="GET">GET</SelectItem>
46+
<SelectItem value="PUT">PUT</SelectItem>
47+
</SelectContent>
48+
</Select>
4949

50-
<Input
51-
type="text"
52-
name="endpoint"
53-
defaultValue="/api/hello"
54-
className={cn(
55-
"flex-1 font-mono",
56-
"bg-transparent border-0 shadow-none",
57-
"focus-visible:ring-0 focus-visible:ring-offset-0"
58-
)}
59-
placeholder="/api/hello"
60-
/>
50+
<Input
51+
type="text"
52+
name="endpoint"
53+
defaultValue="/api/hello"
54+
className={cn(
55+
'flex-1 font-mono',
56+
'bg-transparent border-0 shadow-none',
57+
'focus-visible:ring-0 focus-visible:ring-offset-0'
58+
)}
59+
placeholder="/api/hello"
60+
/>
6161

62-
<Button type="submit" variant="secondary">
63-
Send
64-
</Button>
65-
</form>
62+
<Button type="submit" variant="secondary">
63+
Send
64+
</Button>
65+
</form>
6666

67-
<textarea
68-
ref={responseInputRef}
69-
readOnly
70-
placeholder="Response will appear here..."
71-
className={cn(
72-
"w-full min-h-[140px] bg-card",
73-
"border border-input rounded-xl p-3",
74-
"font-mono resize-y",
75-
"placeholder:text-muted-foreground"
76-
)}
77-
/>
78-
</div>
79-
);
67+
<textarea
68+
ref={responseInputRef}
69+
readOnly
70+
placeholder="Response will appear here..."
71+
className={cn(
72+
'w-full min-h-[140px] bg-card',
73+
'border border-input rounded-xl p-3',
74+
'font-mono resize-y',
75+
'placeholder:text-muted-foreground'
76+
)}
77+
/>
78+
</div>
79+
);
8080
}

0 commit comments

Comments
 (0)