@ardly/bunext 1.0.5 → 1.0.7
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/LICENSE +21 -0
- package/README.md +33 -16
- package/cli.mjs +126 -0
- package/package.json +14 -58
- package/.eslintrc.json +0 -8
- package/.prettierignore +0 -4
- package/STRUCTURE.md +0 -77
- package/bin/cli.mjs +0 -133
- package/bin/utils.mjs +0 -32
- package/components.json +0 -21
- package/next.config.ts +0 -22
- package/postcss.config.mjs +0 -8
- package/prettier.config.js +0 -7
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/favicon.svg +0 -1
- package/public/loading-dots.gif +0 -0
- package/public/logo.svg +0 -1
- package/public/ogImage.webp +0 -0
- package/public/site.webmanifest +0 -19
- package/src/actions/placeholder.ts +0 -30
- package/src/actions/sampleAction.ts +0 -39
- package/src/app/(index)/intr/TestCard.tsx +0 -31
- package/src/app/(index)/intr/page.tsx +0 -17
- package/src/app/(index)/page.tsx +0 -156
- package/src/app/(index)/pagetr/page.tsx +0 -37
- package/src/app/error-wrapper.tsx +0 -32
- package/src/app/global-error.tsx +0 -53
- package/src/app/layout.tsx +0 -56
- package/src/app/loading.tsx +0 -11
- package/src/app/not-found.tsx +0 -45
- package/src/app/sitemap.ts +0 -14
- package/src/components/Providers/root-provider.tsx +0 -22
- package/src/components/Providers/theme-provider.tsx +0 -27
- package/src/components/TestComp.tsx +0 -11
- package/src/components/brand.tsx +0 -35
- package/src/components/navigation/footer.tsx +0 -32
- package/src/components/navigation/main-nav.tsx +0 -55
- package/src/components/navigation/mobile-nav.tsx +0 -154
- package/src/components/navigation/site-header.tsx +0 -67
- package/src/components/ui/avatar.tsx +0 -50
- package/src/components/ui/badge.tsx +0 -36
- package/src/components/ui/button.tsx +0 -56
- package/src/components/ui/card.tsx +0 -79
- package/src/components/ui/command.tsx +0 -153
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/drawer.tsx +0 -118
- package/src/components/ui/dropdown-menu.tsx +0 -200
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/multi-select.tsx +0 -380
- package/src/components/ui/origin/multiselect.tsx +0 -645
- package/src/components/ui/popover.tsx +0 -31
- package/src/components/ui/radio-group.tsx +0 -44
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/themeSelector.tsx +0 -157
- package/src/components/ui/toast.tsx +0 -129
- package/src/components/ui/toaster.tsx +0 -31
- package/src/components/ui/tooltip.tsx +0 -39
- package/src/components/utils/ConditionalLink.tsx +0 -46
- package/src/components/utils/Image.tsx +0 -57
- package/src/components/utils/Img.tsx +0 -104
- package/src/components/utils/Spinner.tsx +0 -29
- package/src/components/utils/TopButton.tsx +0 -67
- package/src/components/utils/TransitionLink.tsx +0 -67
- package/src/components/utils/copy.tsx +0 -98
- package/src/components/utils/featureFlag.tsx +0 -22
- package/src/components/utils/icons.tsx +0 -155
- package/src/components/utils/share-modal.tsx +0 -159
- package/src/hooks/use-intersection.ts +0 -52
- package/src/hooks/use-lazy-load.ts +0 -33
- package/src/hooks/use-meta-color.ts +0 -25
- package/src/hooks/use-toast.ts +0 -191
- package/src/lib/config/featureflags.ts +0 -63
- package/src/lib/config/siteConfig.ts +0 -172
- package/src/lib/config/user.ts +0 -9
- package/src/lib/data/footer-data.ts +0 -85
- package/src/lib/data/nav-data.ts +0 -30
- package/src/lib/data/siteData.ts +0 -52
- package/src/lib/utils/index.ts +0 -190
- package/src/styles/customGlobal.css +0 -141
- package/src/styles/globals.css +0 -72
- package/src/styles/tailwind/base.ts +0 -46
- package/src/styles/tailwind/fonts/ClashDisplay-Bold.eot +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Bold.ttf +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Bold.woff +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Bold.woff2 +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Extralight.eot +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Extralight.ttf +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Extralight.woff +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Extralight.woff2 +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Light.eot +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Light.ttf +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Light.woff +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Light.woff2 +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Medium.eot +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Medium.ttf +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Medium.woff +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Medium.woff2 +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Regular.eot +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Regular.ttf +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Regular.woff +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Regular.woff2 +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Semibold.eot +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Semibold.ttf +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Semibold.woff +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Semibold.woff2 +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Variable.eot +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Variable.ttf +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Variable.woff +0 -0
- package/src/styles/tailwind/fonts/ClashDisplay-Variable.woff2 +0 -0
- package/src/styles/tailwind/fonts/GeistMonoVF.woff +0 -0
- package/src/styles/tailwind/fonts/GeistVF.woff +0 -0
- package/src/styles/tailwind/fonts.ts +0 -51
- package/src/styles/tailwind/tailwindUtils.ts +0 -29
- package/src/types/index.ts +0 -80
- package/tailwind.config.ts +0 -104
- package/tsconfig.json +0 -28
- package/vercel.json +0 -6
package/public/site.webmanifest
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Bunext",
|
|
3
|
-
"short_name": "Bunext",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "/android-chrome-192x192.png",
|
|
7
|
-
"sizes": "192x192",
|
|
8
|
-
"type": "image/png"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "/android-chrome-512x512.png",
|
|
12
|
-
"sizes": "512x512",
|
|
13
|
-
"type": "image/png"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"theme_color": "#fbf0df",
|
|
17
|
-
"background_color": "#2d2b2a",
|
|
18
|
-
"display": "standalone"
|
|
19
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { promises as fs } from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import sharp from 'sharp';
|
|
5
|
-
function bufferToBase64(buffer: Buffer): string {
|
|
6
|
-
return `data:image/png;base64,${buffer.toString('base64')}`;
|
|
7
|
-
}
|
|
8
|
-
async function getFileBufferLocal(src: string) {
|
|
9
|
-
const realsrc = path.join(process.cwd(), 'public', src);
|
|
10
|
-
return fs.readFile(realsrc);
|
|
11
|
-
}
|
|
12
|
-
async function getFileBufferRemote(url: string) {
|
|
13
|
-
const response = await fetch(url);
|
|
14
|
-
return Buffer.from(await response.arrayBuffer());
|
|
15
|
-
}
|
|
16
|
-
function getFileBuffer(src: string) {
|
|
17
|
-
const isRemote = src.startsWith('http');
|
|
18
|
-
return isRemote ? getFileBufferRemote(src) : getFileBufferLocal(src);
|
|
19
|
-
}
|
|
20
|
-
export async function getPlaceholderImage(src: string) {
|
|
21
|
-
try {
|
|
22
|
-
const originalBuffer = await (src.startsWith('http')
|
|
23
|
-
? getFileBuffer(src)
|
|
24
|
-
: getFileBufferLocal(src));
|
|
25
|
-
const resizedBuffer = await sharp(originalBuffer).resize(20).toBuffer();
|
|
26
|
-
return bufferToBase64(resizedBuffer);
|
|
27
|
-
} catch {
|
|
28
|
-
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOsa2yqBwAFCAICLICSyQAAAABJRU5ErkJggg==';
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use server'
|
|
2
|
-
// https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations
|
|
3
|
-
import { revalidatePath } from 'next/cache'
|
|
4
|
-
import { redirect } from 'next/navigation'
|
|
5
|
-
|
|
6
|
-
export async function createSampleItem(formData: FormData) {
|
|
7
|
-
try {
|
|
8
|
-
const rawFormData = {
|
|
9
|
-
title: formData.get('title'),
|
|
10
|
-
description: formData.get('description'),
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Sample validation
|
|
14
|
-
if (!rawFormData.title || !rawFormData.description) {
|
|
15
|
-
throw new Error('Title and description are required')
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Here you would typically:
|
|
19
|
-
// 1. Validate the data
|
|
20
|
-
// 2. Insert into database
|
|
21
|
-
// 3. Handle any errors
|
|
22
|
-
|
|
23
|
-
// Sample success path
|
|
24
|
-
revalidatePath('/items') // Revalidate the items list
|
|
25
|
-
redirect('/items') // Redirect to items page
|
|
26
|
-
} catch (error) {
|
|
27
|
-
// Handle errors appropriately
|
|
28
|
-
if (error instanceof Error) {
|
|
29
|
-
return {
|
|
30
|
-
success: false,
|
|
31
|
-
error: error.message,
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
success: false,
|
|
36
|
-
error: 'Something went wrong',
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { useIntersection } from '@/hooks/use-intersection'
|
|
3
|
-
import { cn } from '@/lib/utils'
|
|
4
|
-
|
|
5
|
-
type TTestCard = {
|
|
6
|
-
className?: string
|
|
7
|
-
index: number
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function TestCard({ className, index }: TTestCard) {
|
|
11
|
-
const { ref, isInView } = useIntersection({ threshold: 0.2, once: true })
|
|
12
|
-
return (
|
|
13
|
-
<div
|
|
14
|
-
ref={ref}
|
|
15
|
-
className={cn(
|
|
16
|
-
'w-full max-w-md rounded-lg bg-muted/45 p-6 shadow-lg transition-opacity duration-500',
|
|
17
|
-
isInView
|
|
18
|
-
? 'motion-scale-in-[0.41] motion-translate-x-in-[2%] motion-translate-y-in-[111%] motion-blur-in-[60px] motion-delay-75'
|
|
19
|
-
: 'opacity-0',
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
>
|
|
23
|
-
<h2 className="mb-4 text-2xl font-semibold">Card {index + 1}</h2>
|
|
24
|
-
<p className="text-muted-foreground">
|
|
25
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
|
|
26
|
-
tempfwfor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
|
|
27
|
-
veniam.
|
|
28
|
-
</p>
|
|
29
|
-
</div>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TestCard } from './TestCard'
|
|
2
|
-
|
|
3
|
-
export default function Page() {
|
|
4
|
-
// Simulate a production error
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<main className="container mx-auto">
|
|
8
|
-
<div className="flex flex-col items-center gap-8 py-12">
|
|
9
|
-
<h1 className="text-4xl font-bold">Scroll Intersection Example</h1>
|
|
10
|
-
|
|
11
|
-
{Array.from({ length: 20 }).map((_, i) => (
|
|
12
|
-
<TestCard key={i} index={i} />
|
|
13
|
-
))}
|
|
14
|
-
</div>
|
|
15
|
-
</main>
|
|
16
|
-
)
|
|
17
|
-
}
|
package/src/app/(index)/page.tsx
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { ArrowRightLeft, Github, Plus, Rocket } from 'lucide-react'
|
|
2
|
-
|
|
3
|
-
import { Button } from '@/components/ui/button'
|
|
4
|
-
import {
|
|
5
|
-
Card,
|
|
6
|
-
CardContent,
|
|
7
|
-
CardDescription,
|
|
8
|
-
CardHeader,
|
|
9
|
-
CardTitle,
|
|
10
|
-
} from '@/components/ui/card'
|
|
11
|
-
import { TransitionLink } from '@/components/utils/TransitionLink'
|
|
12
|
-
import {
|
|
13
|
-
AppWindow,
|
|
14
|
-
Flag,
|
|
15
|
-
Layers,
|
|
16
|
-
Moon,
|
|
17
|
-
Palette,
|
|
18
|
-
Search,
|
|
19
|
-
ShieldCheck,
|
|
20
|
-
SlidersHorizontal,
|
|
21
|
-
Type,
|
|
22
|
-
Wand2,
|
|
23
|
-
Zap,
|
|
24
|
-
} from 'lucide-react'
|
|
25
|
-
import { TestComponent } from '@/components/TestComp'
|
|
26
|
-
|
|
27
|
-
export default function Home() {
|
|
28
|
-
const features = [
|
|
29
|
-
{
|
|
30
|
-
title: 'Next.js 15 App Directory',
|
|
31
|
-
icon: AppWindow,
|
|
32
|
-
description:
|
|
33
|
-
'Utilizing the latest Next.js features for optimal performance.',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
title: 'Tailwind CSS',
|
|
37
|
-
icon: Palette,
|
|
38
|
-
description: 'Utility-first CSS framework for rapid UI development.',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
title: 'Shadcn Components',
|
|
42
|
-
icon: Layers,
|
|
43
|
-
description:
|
|
44
|
-
'Beautiful and accessible components built with Radix UI and Tailwind CSS.',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
title: 'Custom Font Optimization',
|
|
48
|
-
icon: Type,
|
|
49
|
-
description: 'Using Next Font for optimized font loading and display.',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
title: 'Lucide React Icons',
|
|
53
|
-
icon: Zap,
|
|
54
|
-
description: 'Beautiful, consistent, and customizable icons.',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
title: 'Next Theme Provider',
|
|
58
|
-
icon: Moon,
|
|
59
|
-
description: 'Easy implementation of dark and light mode.',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: 'Metadata Generator',
|
|
63
|
-
icon: Search,
|
|
64
|
-
description: 'SEO optimization including apple-touch-icon generation.',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
title: 'Feature Flags',
|
|
68
|
-
icon: Flag,
|
|
69
|
-
description: 'Implement and manage feature toggles with ease.',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
title: 'Zod Validation',
|
|
73
|
-
icon: ShieldCheck,
|
|
74
|
-
description:
|
|
75
|
-
'Runtime type checking and validation for JavaScript and TypeScript.',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
title: 'Page Transitions',
|
|
79
|
-
icon: ArrowRightLeft,
|
|
80
|
-
description:
|
|
81
|
-
'Per-link page transitions without any additional libraries.',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
title: 'Fluid Tailwind',
|
|
85
|
-
icon: Wand2,
|
|
86
|
-
description: 'Easier responsive design with fluid utilities.',
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
title: 'Biome',
|
|
90
|
-
icon: SlidersHorizontal,
|
|
91
|
-
description:
|
|
92
|
-
'Modern linting and formatting for JavaScript and TypeScript.',
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
title: 'Utility Functions',
|
|
96
|
-
icon: SlidersHorizontal,
|
|
97
|
-
description:
|
|
98
|
-
'QR code generation, string shortening, unique code generation, and more.',
|
|
99
|
-
},
|
|
100
|
-
]
|
|
101
|
-
|
|
102
|
-
return (
|
|
103
|
-
<div className="container mx-auto px-4 py-8">
|
|
104
|
-
<section className="mb-12 text-center">
|
|
105
|
-
<h1 className="motion-preset-bounce mb-4 font-clash text-5xl font-medium tracking-tight motion-duration-500">
|
|
106
|
-
Next.js 15 Bun Starter Template
|
|
107
|
-
</h1>
|
|
108
|
-
<p className="motion-preset-bounce mx-auto mb-8 max-w-2xl text-xl text-muted-foreground motion-duration-500">
|
|
109
|
-
Jumpstart your Next.js projects with this feature-packed starter
|
|
110
|
-
template. Built with performance, accessibility, and developer
|
|
111
|
-
experience in mind.
|
|
112
|
-
</p>
|
|
113
|
-
<Button
|
|
114
|
-
size="sm"
|
|
115
|
-
asChild
|
|
116
|
-
className="motion-scale-in-[0.5] motion-translate-x-in-[-120%] motion-translate-y-in-[-60%] motion-rotate-in-[-1080deg] motion-blur-in-[10px] motion-opacity-in-[33%] motion-duration-[0.15s]/blur motion-duration-[0.38s]/opacity motion-duration-[1.20s]/rotate motion-delay-[0.38s]/scale motion-delay-[0.60s]/blur motion-ease-spring-bouncier"
|
|
117
|
-
>
|
|
118
|
-
<TransitionLink href="/pagetr" className="flex items-center gap-2">
|
|
119
|
-
<ArrowRightLeft className="h-4 w-4" />
|
|
120
|
-
<span className="">Page Transition</span>
|
|
121
|
-
</TransitionLink>
|
|
122
|
-
</Button>
|
|
123
|
-
</section>
|
|
124
|
-
<section className="grid gap-6 motion-scale-in-[0.5] motion-translate-x-in-[39%] motion-translate-y-in-[84%] motion-rotate-in-[8deg] motion-blur-in-[5px] motion-opacity-in-[0%] motion-duration-[0.35s] motion-duration-[0.53s]/scale motion-duration-[0.53s]/translate motion-duration-[0.63s]/rotate sm:grid-cols-2 lg:grid-cols-3">
|
|
125
|
-
{features.map((feature, index) => (
|
|
126
|
-
<Card key={index}>
|
|
127
|
-
<CardHeader>
|
|
128
|
-
<CardTitle className="flex items-center gap-2">
|
|
129
|
-
<feature.icon className="h-8 w-8" />
|
|
130
|
-
{feature.title}
|
|
131
|
-
</CardTitle>
|
|
132
|
-
</CardHeader>
|
|
133
|
-
<CardContent>
|
|
134
|
-
<CardDescription>{feature.description}</CardDescription>
|
|
135
|
-
</CardContent>
|
|
136
|
-
</Card>
|
|
137
|
-
))}
|
|
138
|
-
<Card className="text-foreground/30">
|
|
139
|
-
<CardHeader></CardHeader>
|
|
140
|
-
<CardContent className="text-center">
|
|
141
|
-
<div className="-ml-3 flex items-center justify-center gap-2">
|
|
142
|
-
<Plus className="h-8 w-8" />
|
|
143
|
-
<h1 className="text-2xl font-bold">Loading?..</h1>
|
|
144
|
-
</div>
|
|
145
|
-
<CardDescription className="text-foreground/30">
|
|
146
|
-
More features coming soon... *probably
|
|
147
|
-
</CardDescription>
|
|
148
|
-
</CardContent>
|
|
149
|
-
</Card>
|
|
150
|
-
</section>
|
|
151
|
-
<section className="grid place-items-center py-6">
|
|
152
|
-
<TestComponent></TestComponent>
|
|
153
|
-
</section>
|
|
154
|
-
</div>
|
|
155
|
-
)
|
|
156
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { AppWindow, ArrowRightLeft } from 'lucide-react'
|
|
2
|
-
|
|
3
|
-
import { Button } from '@/components/ui/button'
|
|
4
|
-
|
|
5
|
-
import { TransitionLink } from '@/components/utils/TransitionLink'
|
|
6
|
-
import Link from 'next/link'
|
|
7
|
-
|
|
8
|
-
export default function PageTr() {
|
|
9
|
-
return (
|
|
10
|
-
<div className="container mx-auto flex flex-col items-center px-4 py-8">
|
|
11
|
-
<h1 className="mb-4 font-clash text-4xl font-medium tracking-tight lg:text-5xl">
|
|
12
|
-
Transition Test page
|
|
13
|
-
</h1>
|
|
14
|
-
<div className="mb-8 text-center">
|
|
15
|
-
<div className="mb-4">
|
|
16
|
-
<p className="mx-auto max-w-2xl text-xl text-muted-foreground">
|
|
17
|
-
to edit the transion duration go to{' '}
|
|
18
|
-
</p>
|
|
19
|
-
<code>src/components/utils/TransitionLink.tsx</code>
|
|
20
|
-
</div>
|
|
21
|
-
<div>
|
|
22
|
-
<p className="mx-auto max-w-2xl text-xl text-muted-foreground">
|
|
23
|
-
to edit the transion styling go to{' '}
|
|
24
|
-
</p>
|
|
25
|
-
<code>src/styles/customGlobal.css</code>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<Button size="sm" asChild>
|
|
30
|
-
<TransitionLink href="/" className="flex items-center gap-2">
|
|
31
|
-
<ArrowRightLeft className="h-4 w-4" />
|
|
32
|
-
<span className="">Home</span>
|
|
33
|
-
</TransitionLink>
|
|
34
|
-
</Button>
|
|
35
|
-
</div>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
// this is used to simulate an error in the production environment to check global error handling
|
|
3
|
-
import '@/styles/globals.css'
|
|
4
|
-
import '@/styles/customGlobal.css'
|
|
5
|
-
import { useState } from 'react'
|
|
6
|
-
import { Button } from '@/components/ui/button'
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
children: React.ReactNode
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const ErrorSimulator = ({
|
|
13
|
-
message = 'This is a simulated error',
|
|
14
|
-
}: {
|
|
15
|
-
message?: string
|
|
16
|
-
}) => {
|
|
17
|
-
const [error, setError] = useState(false)
|
|
18
|
-
if (error) throw new Error(message)
|
|
19
|
-
|
|
20
|
-
return <Button onClick={() => setError(true)}>Simulate Error</Button>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const ErrorWrapper = ({ children }: Props) => {
|
|
24
|
-
return (
|
|
25
|
-
<div>
|
|
26
|
-
{children}
|
|
27
|
-
<ErrorSimulator />
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default ErrorWrapper
|
package/src/app/global-error.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
// https://nextjs.org/docs/app/building-your-application/routing/error-handling
|
|
3
|
-
import { RefreshCcw } from 'lucide-react'
|
|
4
|
-
import { Button } from '@/components/ui/button'
|
|
5
|
-
import '@/styles/globals.css'
|
|
6
|
-
import '@/styles/customGlobal.css'
|
|
7
|
-
import { Metadata } from 'next'
|
|
8
|
-
import { siteData } from '@/lib/data/siteData'
|
|
9
|
-
|
|
10
|
-
export const metadata: Metadata = {
|
|
11
|
-
title: `:( Error / ${siteData.name}`,
|
|
12
|
-
description: `An Error Occurred :( // ${siteData.name}`,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default function GlobalError({
|
|
16
|
-
error,
|
|
17
|
-
reset,
|
|
18
|
-
}: {
|
|
19
|
-
error: Error & { digest?: string }
|
|
20
|
-
reset: () => void
|
|
21
|
-
}) {
|
|
22
|
-
return (
|
|
23
|
-
<html lang="en" className="dark">
|
|
24
|
-
<body>
|
|
25
|
-
<div className="flex min-h-screen flex-col items-center justify-center motion-blur-in-[50px]">
|
|
26
|
-
<h1 className="motion-preset-seesaw text-9xl font-bold">500</h1>
|
|
27
|
-
<h2 className="text-2xl font-bold">
|
|
28
|
-
{error.message || 'Something went wrong!'}
|
|
29
|
-
</h2>
|
|
30
|
-
<div className="flex flex-wrap items-center justify-center gap-2">
|
|
31
|
-
<p className="mt-2">We apologize for the inconvenience</p>
|
|
32
|
-
{error.digest && (
|
|
33
|
-
<code className="mt-2 rounded-md border bg-muted/50 p-2 text-sm">
|
|
34
|
-
Error ID: {error.digest}
|
|
35
|
-
</code>
|
|
36
|
-
)}
|
|
37
|
-
</div>
|
|
38
|
-
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
39
|
-
<Button className="group mt-10" onClick={() => reset()}>
|
|
40
|
-
<RefreshCcw
|
|
41
|
-
className="-ms-1 opacity-60 transition-transform duration-500 group-hover:rotate-180"
|
|
42
|
-
size={16}
|
|
43
|
-
strokeWidth={2}
|
|
44
|
-
aria-hidden="true"
|
|
45
|
-
/>
|
|
46
|
-
Refresh
|
|
47
|
-
</Button>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</body>
|
|
51
|
-
</html>
|
|
52
|
-
)
|
|
53
|
-
}
|
package/src/app/layout.tsx
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { Metadata, Viewport } from 'next'
|
|
2
|
-
import { siteMetaData, viewportData } from '@/lib/config/siteConfig'
|
|
3
|
-
// metadata
|
|
4
|
-
export const metadata: Metadata = siteMetaData
|
|
5
|
-
export const viewport: Viewport = viewportData
|
|
6
|
-
// css
|
|
7
|
-
import '@/styles/globals.css'
|
|
8
|
-
import '@/styles/customGlobal.css'
|
|
9
|
-
// utilities
|
|
10
|
-
import { cn } from '@/lib/utils'
|
|
11
|
-
import { fonts } from '@/styles/tailwind/fonts'
|
|
12
|
-
// providers
|
|
13
|
-
import { RootProvider } from '@/components/Providers/root-provider'
|
|
14
|
-
// components
|
|
15
|
-
import { SiteHeader } from '@/components/navigation/site-header'
|
|
16
|
-
import { FeatureFlag } from '@/components/utils/featureFlag'
|
|
17
|
-
import { ModeSelector } from '@/components/ui/themeSelector'
|
|
18
|
-
import { SimpleFooter } from '@/components/navigation/footer'
|
|
19
|
-
import { ScrollToTopButton } from '@/components/utils/TopButton'
|
|
20
|
-
// import { Suspense } from "react";
|
|
21
|
-
// import Loading from "./loading";
|
|
22
|
-
// import ErrorWrapper from "./error-wrapper";
|
|
23
|
-
// this is used to simulate an error in the production environment to check global error handling
|
|
24
|
-
|
|
25
|
-
export default function RootLayout({
|
|
26
|
-
children,
|
|
27
|
-
}: Readonly<{
|
|
28
|
-
children: React.ReactNode
|
|
29
|
-
}>) {
|
|
30
|
-
return (
|
|
31
|
-
<html lang="en">
|
|
32
|
-
<body className={cn('page-transition-easing font-sans', fonts)}>
|
|
33
|
-
<RootProvider>
|
|
34
|
-
<div data-wrapper="" className="">
|
|
35
|
-
<div className="mx-auto flex min-h-screen w-full flex-col border-border/40 dark:border-border min-[1800px]:max-w-[1536px] min-[1800px]:border-x">
|
|
36
|
-
<SiteHeader />
|
|
37
|
-
<main className="flex-1">
|
|
38
|
-
{/* <Suspense fallback={<Loading />}>{children}</Suspense> */}
|
|
39
|
-
{children}
|
|
40
|
-
</main>
|
|
41
|
-
<SimpleFooter className="mt-auto" />
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
{/* checks if theme and theme button feature flags are enabled */}
|
|
45
|
-
<FeatureFlag featureFlag={['NEXT_THEME', 'THEME_BUTTON']}>
|
|
46
|
-
<ModeSelector
|
|
47
|
-
className="fixed bottom-2 right-2 z-50"
|
|
48
|
-
iconClassName="size-3"
|
|
49
|
-
/>
|
|
50
|
-
</FeatureFlag>
|
|
51
|
-
<ScrollToTopButton className="fixed bottom-12 right-4" />
|
|
52
|
-
</RootProvider>
|
|
53
|
-
</body>
|
|
54
|
-
</html>
|
|
55
|
-
)
|
|
56
|
-
}
|
package/src/app/loading.tsx
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming
|
|
2
|
-
export default function RootLoading() {
|
|
3
|
-
return (
|
|
4
|
-
<div className="fixed left-1/2 top-1/2 -translate-x-[50%] -translate-y-[50%]">
|
|
5
|
-
<div className="flex flex-col items-center">
|
|
6
|
-
<img src="/loading-dots.gif" alt="Loading" className="size-12" />
|
|
7
|
-
<p className="animate-pulse text-sm font-medium">Just a moment...</p>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
)
|
|
11
|
-
}
|
package/src/app/not-found.tsx
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
// https://nextjs.org/docs/app/api-reference/file-conventions/not-found
|
|
3
|
-
|
|
4
|
-
import Link from 'next/link'
|
|
5
|
-
import { usePathname } from 'next/navigation'
|
|
6
|
-
// icons
|
|
7
|
-
import { ArrowLeft } from 'lucide-react'
|
|
8
|
-
// components
|
|
9
|
-
import { Button } from '@/components/ui/button'
|
|
10
|
-
export default function NotFound() {
|
|
11
|
-
const pathname = usePathname()
|
|
12
|
-
return (
|
|
13
|
-
<div className="flex min-h-screen flex-col items-center justify-center motion-blur-in-[50px]">
|
|
14
|
-
<h1 className="motion-preset-seesaw text-9xl font-bold">404</h1>
|
|
15
|
-
<h2 className="text-2xl font-bold">Page Not Found</h2>
|
|
16
|
-
<div className="flex flex-wrap items-center justify-center gap-2">
|
|
17
|
-
<p className="mt-2">Sorry, we couldn't find</p>
|
|
18
|
-
<code className="mt-2 rounded-md border bg-muted/50 p-2 text-sm">
|
|
19
|
-
"{pathname}"
|
|
20
|
-
</code>
|
|
21
|
-
</div>
|
|
22
|
-
<div className="flex flex-wrap items-center justify-center gap-4">
|
|
23
|
-
{/* {hasPreviousPath && (
|
|
24
|
-
<Button className="mt-10" asChild>
|
|
25
|
-
<Link href="/">
|
|
26
|
-
<ArrowLeft />
|
|
27
|
-
Go back
|
|
28
|
-
</Link>
|
|
29
|
-
</Button>
|
|
30
|
-
)} */}
|
|
31
|
-
<Button className="group mt-10" asChild>
|
|
32
|
-
<Link href="/">
|
|
33
|
-
<ArrowLeft
|
|
34
|
-
className="-ms-1 opacity-60 transition-transform group-hover:-translate-x-0.5"
|
|
35
|
-
size={16}
|
|
36
|
-
strokeWidth={2}
|
|
37
|
-
aria-hidden="true"
|
|
38
|
-
/>
|
|
39
|
-
Return to Home
|
|
40
|
-
</Link>
|
|
41
|
-
</Button>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
)
|
|
45
|
-
}
|
package/src/app/sitemap.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { MetadataRoute } from 'next'
|
|
2
|
-
import { remoteUrl } from '@/lib/config/siteConfig'
|
|
3
|
-
// for more info:
|
|
4
|
-
// https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap
|
|
5
|
-
export default function sitemap(): MetadataRoute.Sitemap {
|
|
6
|
-
return [
|
|
7
|
-
{
|
|
8
|
-
url: remoteUrl,
|
|
9
|
-
lastModified: new Date(),
|
|
10
|
-
changeFrequency: 'monthly',
|
|
11
|
-
priority: 1,
|
|
12
|
-
},
|
|
13
|
-
]
|
|
14
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FEATURE_FLAGS } from '@/lib/config/featureflags'
|
|
2
|
-
|
|
3
|
-
import { ThemeProvider } from '@/components/Providers/theme-provider'
|
|
4
|
-
import { NuqsAdapter } from 'nuqs/adapters/next/app'
|
|
5
|
-
import { Toaster } from '@/components/ui/toaster'
|
|
6
|
-
|
|
7
|
-
export function RootProvider({
|
|
8
|
-
children,
|
|
9
|
-
}: Readonly<{
|
|
10
|
-
children: React.ReactNode
|
|
11
|
-
}>) {
|
|
12
|
-
return (
|
|
13
|
-
<>
|
|
14
|
-
<NuqsAdapter>
|
|
15
|
-
<ThemeProvider disableTransitionOnChange>
|
|
16
|
-
{children}
|
|
17
|
-
<Toaster />
|
|
18
|
-
</ThemeProvider>
|
|
19
|
-
</NuqsAdapter>
|
|
20
|
-
</>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { FEATURE_FLAGS } from '@/lib/config/featureflags'
|
|
4
|
-
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
|
5
|
-
import type * as React from 'react'
|
|
6
|
-
|
|
7
|
-
type Theme = 'light' | 'dark' | 'system'
|
|
8
|
-
|
|
9
|
-
export function ThemeProvider({
|
|
10
|
-
children,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof NextThemesProvider>) {
|
|
13
|
-
const defaultTheme = FEATURE_FLAGS.DEFAULT_THEME as Theme
|
|
14
|
-
if (!FEATURE_FLAGS.NEXT_THEME) return <>{children}</>
|
|
15
|
-
return (
|
|
16
|
-
<NextThemesProvider
|
|
17
|
-
defaultTheme={defaultTheme}
|
|
18
|
-
enableSystem={defaultTheme === 'system'}
|
|
19
|
-
attribute="class"
|
|
20
|
-
disableTransitionOnChange
|
|
21
|
-
enableColorScheme={false}
|
|
22
|
-
{...props}
|
|
23
|
-
>
|
|
24
|
-
{children}
|
|
25
|
-
</NextThemesProvider>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { cn, getPlaceholder } from '@/lib/utils'
|
|
3
|
-
import Image from 'next/image'
|
|
4
|
-
|
|
5
|
-
type TTestComponent = {
|
|
6
|
-
className?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function TestComponent({ className }: TTestComponent) {
|
|
10
|
-
return <div className={cn('', className)}></div>
|
|
11
|
-
}
|
package/src/components/brand.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { LinkProps } from 'next/link'
|
|
2
|
-
|
|
3
|
-
import Link from 'next/link'
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils'
|
|
6
|
-
import { Img } from '@/components/utils/Img'
|
|
7
|
-
|
|
8
|
-
type TLogo = LinkProps & {
|
|
9
|
-
className?: string
|
|
10
|
-
href?: string
|
|
11
|
-
iconClassName?: string
|
|
12
|
-
height?: number
|
|
13
|
-
width?: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function Logo({
|
|
17
|
-
className,
|
|
18
|
-
href,
|
|
19
|
-
iconClassName,
|
|
20
|
-
height,
|
|
21
|
-
width,
|
|
22
|
-
...props
|
|
23
|
-
}: TLogo) {
|
|
24
|
-
return (
|
|
25
|
-
<Link href={href || '/'} {...props} className={cn('', className)}>
|
|
26
|
-
<Img
|
|
27
|
-
height={height || 32}
|
|
28
|
-
src="/logo.svg"
|
|
29
|
-
width={width || 185}
|
|
30
|
-
alt="logo"
|
|
31
|
-
className={iconClassName}
|
|
32
|
-
/>
|
|
33
|
-
</Link>
|
|
34
|
-
)
|
|
35
|
-
}
|