Skip to content

armgit / mapcn

Public Imported from GitHub
0

Beautiful map components. 100% Free, Zero config, one command setup.

TypeScript

theme update

Anmol24527c096994
diff --git a/src/app/(main)/blocks/_components/block-viewer-code.tsx b/src/app/(main)/blocks/_components/block-viewer-code.tsx
index fe11d64..ea1a89a 100644
--- a/src/app/(main)/blocks/_components/block-viewer-code.tsx
+++ b/src/app/(main)/blocks/_components/block-viewer-code.tsx
@@ -77,7 +77,7 @@ export function BlockViewerCode({
<FileTreeSidebar />
</div>
<div className="flex min-w-0 flex-1 flex-col">
- <div className="bg-muted/40 flex h-12 shrink-0 items-center gap-2 border-b px-4 text-sm">
+ <div className="bg-code flex h-12 shrink-0 items-center gap-2 border-b px-4 text-sm">
<span className="text-muted-foreground">{file.target}</span>
<div className="ml-auto">
<CopyCodeButton />
@@ -86,7 +86,7 @@ export function BlockViewerCode({
<div
key={file.path}
dangerouslySetInnerHTML={{ __html: file.highlightedContent }}
- className="bg-muted/40 flex-1 overflow-y-auto p-4 text-sm [&_code]:bg-transparent! [&_pre]:bg-transparent!"
+ className="bg-code no-scrollbar flex-1 overflow-x-auto p-4 text-sm"
/>
</div>
</div>
diff --git a/src/app/(main)/docs/_components/code-block.tsx b/src/app/(main)/docs/_components/code-block.tsx
index 6229997..f19a790 100644
--- a/src/app/(main)/docs/_components/code-block.tsx
+++ b/src/app/(main)/docs/_components/code-block.tsx
@@ -22,7 +22,7 @@ export async function CodeBlock({
</div>
)}
<div
- className="bg-muted/40 overflow-auto p-4 text-sm [&_code]:bg-transparent! [&_pre]:bg-transparent!"
+ className="bg-code no-scrollbar overflow-auto p-4 text-sm"
dangerouslySetInnerHTML={{ __html: highlighted }}
/>
</div>
diff --git a/src/app/(main)/docs/_components/component-preview-client.tsx b/src/app/(main)/docs/_components/component-preview-client.tsx
index 513dfb1..925787f 100644
--- a/src/app/(main)/docs/_components/component-preview-client.tsx
+++ b/src/app/(main)/docs/_components/component-preview-client.tsx
@@ -39,21 +39,15 @@ export function ComponentPreviewClient({
<div
id={codeId}
className={cn(
- "bg-muted/40 p-4 text-sm [&_code]:bg-transparent! [&_pre]:bg-transparent!",
+ "bg-code no-scrollbar p-4 text-sm",
expanded
- ? "max-h-[420px] overflow-auto"
- : "max-h-44 overflow-hidden",
+ ? "max-h-[420px] overflow-x-auto"
+ : "max-h-42 overflow-hidden",
)}
dangerouslySetInnerHTML={{ __html: highlightedCode }}
/>
- <div
- className={cn(
- "absolute inset-x-0 bottom-0 flex w-full items-center justify-center",
- !expanded &&
- "from-background to-background/0 bg-linear-to-t pt-12 pb-6",
- )}
- >
- {!expanded && (
+ {!expanded && (
+ <div className="from-background to-background/0 absolute inset-x-0 bottom-0 flex w-full items-center justify-center bg-linear-to-t pt-16 pb-6">
<Button
variant="outline"
size="sm"
@@ -64,8 +58,8 @@ export function ComponentPreviewClient({
>
View Code
</Button>
- )}
- </div>
+ </div>
+ )}
</div>
</div>
);
diff --git a/src/app/(main)/docs/_components/copy-button.tsx b/src/app/(main)/docs/_components/copy-button.tsx
index e33f8c3..57e97a7 100644
--- a/src/app/(main)/docs/_components/copy-button.tsx
+++ b/src/app/(main)/docs/_components/copy-button.tsx
@@ -23,7 +23,7 @@ export function CopyButton({ text }: CopyButtonProps) {
size="icon-sm"
onClick={copy}
aria-label={copied ? "Copied" : "Copy code"}
- className="text-muted-foreground backdrop-blur-xl"
+ className="text-muted-foreground bg-code"
>
{copied ? <Check /> : <Copy />}
</Button>
diff --git a/src/app/(main)/docs/_components/docs.tsx b/src/app/(main)/docs/_components/docs.tsx
index 8583d30..d7c2855 100644
--- a/src/app/(main)/docs/_components/docs.tsx
+++ b/src/app/(main)/docs/_components/docs.tsx
@@ -136,7 +136,7 @@ interface DocsNoteProps {
export function DocsNote({ children }: DocsNoteProps) {
return (
- <div className="bg-muted/40 text-foreground/80 [&_strong]:text-foreground rounded-lg border px-5 py-4 text-[15px] leading-relaxed [&_strong]:font-medium">
+ <div className="bg-code text-foreground/80 [&_strong]:text-foreground rounded-lg border px-5 py-4 text-[15px] leading-relaxed [&_strong]:font-medium">
{children}
</div>
);
@@ -197,7 +197,7 @@ export function DocsPropTable({ props }: DocsPropTableProps) {
<div className="my-6 overflow-hidden rounded-lg border">
<Table>
<TableHeader>
- <TableRow className="bg-muted/30 hover:bg-transparent">
+ <TableRow className="bg-surface">
<TableHead className="h-10 px-4 text-xs font-medium">
Prop
</TableHead>
@@ -219,12 +219,12 @@ export function DocsPropTable({ props }: DocsPropTableProps) {
<DocsCode className="text-[13px]">{prop.name}</DocsCode>
</TableCell>
<TableCell className="px-4 py-3 align-top whitespace-normal">
- <DocsCode className="text-muted-foreground text-xs">
+ <DocsCode className="text-foreground/70 text-xs">
{prop.type}
</DocsCode>
</TableCell>
<TableCell className="px-4 py-3 align-top">
- <DocsCode className="text-muted-foreground text-xs whitespace-normal">
+ <DocsCode className="text-foreground/70 text-xs whitespace-normal">
{prop.default ?? "—"}
</DocsCode>
</TableCell>
diff --git a/src/app/(main)/docs/_components/install-command.tsx b/src/app/(main)/docs/_components/install-command.tsx
index 6f6424d..41c4124 100644
--- a/src/app/(main)/docs/_components/install-command.tsx
+++ b/src/app/(main)/docs/_components/install-command.tsx
@@ -42,7 +42,7 @@ export function InstallCommand({ name }: InstallCommandProps) {
return (
<div className="relative w-full overflow-hidden rounded-lg border">
<Tabs value={active} onValueChange={setActive} className="gap-0">
- <div className="bg-muted/40 flex items-center justify-between border-b pr-2 pl-2">
+ <div className="bg-code flex items-center justify-between border-b pr-2 pl-2">
<TabsList variant="line" className="h-9 bg-transparent">
{tabs.map((tab) => (
<TabsTrigger
@@ -66,7 +66,7 @@ export function InstallCommand({ name }: InstallCommandProps) {
</div>
{tabs.map((tab) => (
<TabsContent key={tab.manager} value={tab.manager}>
- <pre className="bg-muted/40 overflow-x-auto p-4 text-sm">
+ <pre className="bg-code overflow-x-auto p-4 text-sm">
<code className="font-mono" data-language="bash">
{tab.command}
</code>
diff --git a/src/lib/highlight.ts b/src/lib/highlight.ts
index 0581a45..fc6a0fd 100644
--- a/src/lib/highlight.ts
+++ b/src/lib/highlight.ts
@@ -2,7 +2,7 @@ import { codeToHtml } from "shiki";
export async function highlightCode(
code: string,
- lang: string = "tsx"
+ lang: string = "tsx",
): Promise<string> {
return codeToHtml(code, {
lang,
diff --git a/src/styles/globals.css b/src/styles/globals.css
index f59e187..117e11a 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -36,9 +36,11 @@
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
+ --color-surface: var(--surface);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--color-code-number: var(--code-number);
+ --color-code: var(--code);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
@@ -81,7 +83,9 @@
--sidebar-ring: oklch(0.708 0 0);
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
+ --surface: oklch(0.99 0 0);
--code-number: oklch(0.69 0 0);
+ --code: var(--surface)
}
.dark {
@@ -116,7 +120,9 @@
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
+ --surface: oklch(0.195 0 0);
--code-number: oklch(0.54 0 0);
+ --code: var(--surface)
}
@layer base {
@@ -213,13 +219,13 @@
html .shiki,
html .shiki span {
color: var(--shiki-light) !important;
- background-color: transparent !important;
+ background-color: var(--color-code);
}
html.dark .shiki,
html.dark .shiki span {
color: var(--shiki-dark) !important;
- background-color: transparent !important;
+ background-color: var(--color-code);
}
code {