Beautiful map components. 100% Free, Zero config, one command setup.
TypeScript
Updates
Anmoldeep Singh18752045aad8
diff --git a/README.md b/README.mdindex db3d43b..2ec0e82 100644--- a/README.md+++ b/README.md@@ -10,8 +10,8 @@</p><p>- <a href="https://mapcn.vercel.app">Get Started</a> •- <a href="https://mapcn.vercel.app/docs">Documentation</a> •+ <a href="https://mapcn.vercel.app/docs">Get Started</a> •+ <a href="https://mapcn.vercel.app/docs/installation">Installation</a> •<a href="https://mapcn.vercel.app/docs/basic-map">Examples</a></p></div>diff --git a/src/app/(home)/_components/hero.tsx b/src/app/(home)/_components/hero.tsxindex 920e950..dd59695 100644--- a/src/app/(home)/_components/hero.tsx+++ b/src/app/(home)/_components/hero.tsx@@ -23,7 +23,11 @@ function CopyButton({ text }: { text: string }) {onClick={copy}className="text-muted-foreground hover:text-foreground transition-colors">- {copied ? <Check className="size-4" /> : <Copy className="size-4" />}+ {copied ? (+ <Check className="size-4 text-emerald-500" />+ ) : (+ <Copy className="size-4" />+ )}</button>);}diff --git a/src/app/docs/_components/code-block.tsx b/src/app/docs/_components/code-block.tsxindex 73234d1..a0bbe88 100644--- a/src/app/docs/_components/code-block.tsx+++ b/src/app/docs/_components/code-block.tsx@@ -15,12 +15,12 @@ export async function CodeBlock({const highlighted = await highlightCode(code, language);return (- <div className="relative rounded-lg border bg-muted/30 overflow-hidden">+ <div className="relative rounded-lg border bg-muted/30 min-w-full overflow-x-auto">{showCopyButton && (<CopyButton text={code} className="absolute top-3 right-3" />)}<div- className="p-4 overflow-x-auto text-sm [&_pre]:bg-transparent! [&_code]:bg-transparent!"+ className="p-4 text-sm [&_pre]:bg-transparent! [&_code]:bg-transparent!"dangerouslySetInnerHTML={{ __html: highlighted }}/></div>diff --git a/src/app/docs/_components/docs.tsx b/src/app/docs/_components/docs.tsxindex 285ae82..2c21927 100644--- a/src/app/docs/_components/docs.tsx+++ b/src/app/docs/_components/docs.tsx@@ -43,7 +43,7 @@ export function DocsLayout({next,}: DocsLayoutProps) {return (- <div className="max-w-3xl mx-auto px-6 py-12">+ <div><DocsHeader title={title} description={description} /><div className="mt-10 space-y-10">{children}</div>diff --git a/src/app/docs/api-reference/page.tsx b/src/app/docs/api-reference/page.tsxindex c79b690..03503c5 100644--- a/src/app/docs/api-reference/page.tsx+++ b/src/app/docs/api-reference/page.tsx@@ -54,7 +54,7 @@ export default function ApiReferencePage() {<DocsSection title="Component Anatomy"><p>- All parts of the componet that you can use and combine to build your+ All parts of the component that you can use and combine to build yourmap.</p><CodeBlock code={anatomyCode} showCopyButton={false} />diff --git a/src/app/docs/layout.tsx b/src/app/docs/layout.tsxindex 25985db..db9ce80 100644--- a/src/app/docs/layout.tsx+++ b/src/app/docs/layout.tsx@@ -25,14 +25,15 @@ import {SidebarMenuItem,SidebarProvider,SidebarTrigger,+ useSidebar,} from "@/components/ui/sidebar";import { Header } from "@/components/header";const navigation = [{- title: "Getting Started",+ title: "Basics",items: [- { title: "Introduction", href: "/docs", icon: BookOpen },+ { title: "Getting Started", href: "/docs", icon: BookOpen },{ title: "Installation", href: "/docs/installation", icon: Code },{title: "API Reference",@@ -56,6 +57,7 @@ const navigation = [function DocsSidebar() {const pathname = usePathname();+ const { setOpenMobile } = useSidebar();return (<Sidebar className="top-14 border-r bg-transparent **:data-[sidebar=sidebar]:bg-transparent">@@ -74,7 +76,10 @@ function DocsSidebar() {isActive={pathname === item.href}className="text-muted-foreground hover:text-foreground data-[active=true]:text-foreground data-[active=true]:font-medium">- <Link href={item.href}>+ <Link+ href={item.href}+ onClick={() => setOpenMobile(false)}+ ><item.icon className="size-4" /><span>{item.title}</span></Link>@@ -108,7 +113,9 @@ export default function DocsLayout({/><div className="flex flex-1"><DocsSidebar />- <main className="flex-1">{children}</main>+ <main className="flex-1 max-w-3xl mx-auto w-full px-6 py-12">+ {children}+ </main></div></div></SidebarProvider>diff --git a/src/app/docs/page.tsx b/src/app/docs/page.tsxindex 0b14e8b..1b13a70 100644--- a/src/app/docs/page.tsx+++ b/src/app/docs/page.tsx@@ -45,7 +45,15 @@ export default function IntroductionPage() {<DocsLink href="https://maplibre.org" external>MapLibre GL</DocsLink>- , styled with Tailwind CSS, and designed to work with shadcn/ui.+ , styled with{" "}+ <DocsLink href="https://tailwindcss.com" external>+ Tailwind CSS+ </DocsLink>+ , and designed to work with{" "}+ <DocsLink href="https://ui.shadcn.com" external>+ shadcn/ui+ </DocsLink>+ .</p></DocsSection>