(
- () => ({
- state,
- open,
- setOpen,
- isMobile,
- openMobile,
- setOpenMobile,
- toggleSidebar,
- }),
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
- )
+ // Helper to toggle the sidebar.
+ const toggleSidebar = React.useCallback(() => {
+ return isMobile
+ ? setOpenMobile((open) => !open)
+ : setOpen((open) => !open)
+ }, [isMobile, setOpen, setOpenMobile])
- return (
-
-
- {
+ const handleKeyDown = (event: KeyboardEvent) => {
+ if (
+ event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
+ (event.metaKey || event.ctrlKey)
+ ) {
+ event.preventDefault()
+ toggleSidebar()
+ }
+ }
+
+ window.addEventListener("keydown", handleKeyDown)
+ return () => window.removeEventListener("keydown", handleKeyDown)
+ }, [toggleSidebar])
+
+ // We add a state so that we can do data-state="expanded" or "collapsed".
+ // This makes it easier to style the sidebar with Tailwind classes.
+ const state = open ? "expanded" : "collapsed"
+
+ const contextValue = React.useMemo
(
+ () => ({
+ state,
+ open,
+ setOpen,
+ isMobile,
+ openMobile,
+ setOpenMobile,
+ toggleSidebar,
+ }),
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
+ )
+
+ return (
+
+
+
- {children}
-
-
-
- )
- }
-)
+ }
+ className={cn(
+ "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
+ className
+ )}
+ ref={ref}
+ {...props}
+ >
+ {children}
+
+
+
+ )
+ }
+ )
SidebarProvider.displayName = "SidebarProvider"
const Sidebar = React.forwardRef<
diff --git a/src/hooks/useTheme.ts b/src/hooks/useTheme.ts
index 8ad41716..58063ccb 100644
--- a/src/hooks/useTheme.ts
+++ b/src/hooks/useTheme.ts
@@ -11,7 +11,7 @@ export function useTheme(): {
systemTheme: "light" | "dark";
displayTheme: "light" | "dark";
setTheme: (theme: Theme) => void;
-} {
+ } {
const { config, updateConfig } = useAppContext();
const systemTheme = useSystemTheme();
diff --git a/src/hooks/useToast.ts b/src/hooks/useToast.ts
index 62cc2e21..b6281179 100644
--- a/src/hooks/useToast.ts
+++ b/src/hooks/useToast.ts
@@ -96,9 +96,9 @@ export const reducer = (state: State, action: Action): State => {
toasts: state.toasts.map((t) =>
t.id === toastId || toastId === undefined
? {
- ...t,
- open: false,
- }
+ ...t,
+ open: false,
+ }
: t
),
}
diff --git a/src/hooks/useWallet.ts b/src/hooks/useWallet.ts
index 8030dd29..5894549d 100644
--- a/src/hooks/useWallet.ts
+++ b/src/hooks/useWallet.ts
@@ -73,8 +73,8 @@ export function useWallet() {
const preferredMethod: WalletStatus['preferredMethod'] = activeNWC
? 'nwc'
: webln
- ? 'webln'
- : 'manual';
+ ? 'webln'
+ : 'manual';
const status: WalletStatus = {
hasWebLN: !!webln,
diff --git a/src/hooks/useZaps.ts b/src/hooks/useZaps.ts
index b4e449ea..4246bf55 100644
--- a/src/hooks/useZaps.ts
+++ b/src/hooks/useZaps.ts
@@ -209,98 +209,98 @@ export function useZaps(
try {
const res = await fetch(`${zapEndpoint}?amount=${zapAmount}&nostr=${encodeURI(JSON.stringify(signedZapRequest))}`);
- const responseData = await res.json();
+ const responseData = await res.json();
- if (!res.ok) {
- throw new Error(`HTTP ${res.status}: ${responseData.reason || 'Unknown error'}`);
- }
+ if (!res.ok) {
+ throw new Error(`HTTP ${res.status}: ${responseData.reason || 'Unknown error'}`);
+ }
- const newInvoice = responseData.pr;
- if (!newInvoice || typeof newInvoice !== 'string') {
- throw new Error('Lightning service did not return a valid invoice');
- }
+ const newInvoice = responseData.pr;
+ if (!newInvoice || typeof newInvoice !== 'string') {
+ throw new Error('Lightning service did not return a valid invoice');
+ }
- // Get the current active NWC connection dynamically
- const currentNWCConnection = getActiveConnection();
+ // Get the current active NWC connection dynamically
+ const currentNWCConnection = getActiveConnection();
- // Try NWC first if available and properly connected
- if (currentNWCConnection && currentNWCConnection.connectionString && currentNWCConnection.isConnected) {
- try {
- await sendPayment(currentNWCConnection, newInvoice);
+ // Try NWC first if available and properly connected
+ if (currentNWCConnection && currentNWCConnection.connectionString && currentNWCConnection.isConnected) {
+ try {
+ await sendPayment(currentNWCConnection, newInvoice);
- // Clear states immediately on success
- setIsZapping(false);
- setInvoice(null);
+ // Clear states immediately on success
+ setIsZapping(false);
+ setInvoice(null);
- toast({
- title: 'Zap successful!',
- description: `You sent ${amount} sats via NWC to the author.`,
- });
-
- // Invalidate zap queries to refresh counts
- queryClient.invalidateQueries({ queryKey: ['zaps'] });
-
- // Close dialog last to ensure clean state
- onZapSuccess?.();
- return;
- } catch (nwcError) {
- console.error('NWC payment failed, falling back:', nwcError);
-
- // Show specific NWC error to user for debugging
- const errorMessage = nwcError instanceof Error ? nwcError.message : 'Unknown NWC error';
- toast({
- title: 'NWC payment failed',
- description: `${errorMessage}. Falling back to other payment methods...`,
- variant: 'destructive',
- });
- }
- }
-
- if (webln) { // Try WebLN next
- try {
- await webln.sendPayment(newInvoice);
-
- // Clear states immediately on success
- setIsZapping(false);
- setInvoice(null);
-
- toast({
- title: 'Zap successful!',
- description: `You sent ${amount} sats to the author.`,
- });
-
- // Invalidate zap queries to refresh counts
- queryClient.invalidateQueries({ queryKey: ['zaps'] });
-
- // Close dialog last to ensure clean state
- onZapSuccess?.();
- } catch (weblnError) {
- console.error('webln payment failed, falling back:', weblnError);
-
- // Show specific WebLN error to user for debugging
- const errorMessage = weblnError instanceof Error ? weblnError.message : 'Unknown WebLN error';
- toast({
- title: 'WebLN payment failed',
- description: `${errorMessage}. Falling back to other payment methods...`,
- variant: 'destructive',
- });
-
- setInvoice(newInvoice);
- setIsZapping(false);
- }
- } else { // Default - show QR code and manual Lightning URI
- setInvoice(newInvoice);
- setIsZapping(false);
- }
- } catch (err) {
- console.error('Zap error:', err);
toast({
- title: 'Zap failed',
- description: (err as Error).message,
+ title: 'Zap successful!',
+ description: `You sent ${amount} sats via NWC to the author.`,
+ });
+
+ // Invalidate zap queries to refresh counts
+ queryClient.invalidateQueries({ queryKey: ['zaps'] });
+
+ // Close dialog last to ensure clean state
+ onZapSuccess?.();
+ return;
+ } catch (nwcError) {
+ console.error('NWC payment failed, falling back:', nwcError);
+
+ // Show specific NWC error to user for debugging
+ const errorMessage = nwcError instanceof Error ? nwcError.message : 'Unknown NWC error';
+ toast({
+ title: 'NWC payment failed',
+ description: `${errorMessage}. Falling back to other payment methods...`,
variant: 'destructive',
});
+ }
+ }
+
+ if (webln) { // Try WebLN next
+ try {
+ await webln.sendPayment(newInvoice);
+
+ // Clear states immediately on success
+ setIsZapping(false);
+ setInvoice(null);
+
+ toast({
+ title: 'Zap successful!',
+ description: `You sent ${amount} sats to the author.`,
+ });
+
+ // Invalidate zap queries to refresh counts
+ queryClient.invalidateQueries({ queryKey: ['zaps'] });
+
+ // Close dialog last to ensure clean state
+ onZapSuccess?.();
+ } catch (weblnError) {
+ console.error('webln payment failed, falling back:', weblnError);
+
+ // Show specific WebLN error to user for debugging
+ const errorMessage = weblnError instanceof Error ? weblnError.message : 'Unknown WebLN error';
+ toast({
+ title: 'WebLN payment failed',
+ description: `${errorMessage}. Falling back to other payment methods...`,
+ variant: 'destructive',
+ });
+
+ setInvoice(newInvoice);
setIsZapping(false);
}
+ } else { // Default - show QR code and manual Lightning URI
+ setInvoice(newInvoice);
+ setIsZapping(false);
+ }
+ } catch (err) {
+ console.error('Zap error:', err);
+ toast({
+ title: 'Zap failed',
+ description: (err as Error).message,
+ variant: 'destructive',
+ });
+ setIsZapping(false);
+ }
} catch (err) {
console.error('Zap error:', err);
toast({
diff --git a/src/lib/commands/cut.ts b/src/lib/commands/cut.ts
index 59f4c366..e58c05d8 100644
--- a/src/lib/commands/cut.ts
+++ b/src/lib/commands/cut.ts
@@ -41,42 +41,42 @@ export class CutCommand implements ShellCommand {
} else {
// Read all files
for (const file of files) {
- try {
+ try {
// Handle absolute paths
- if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
- return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
- }
+ if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
+ return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
+ }
- const absolutePath = join(cwd, file);
- const stats = await this.fs.stat(absolutePath);
+ const absolutePath = join(cwd, file);
+ const stats = await this.fs.stat(absolutePath);
- if (stats.isDirectory()) {
- return createErrorResult(`${this.name}: ${file}: Is a directory`);
- }
+ if (stats.isDirectory()) {
+ return createErrorResult(`${this.name}: ${file}: Is a directory`);
+ }
- const content = await this.fs.readFile(absolutePath, 'utf8');
- const fileLines = content.split('\n');
+ const content = await this.fs.readFile(absolutePath, 'utf8');
+ const fileLines = content.split('\n');
- // Remove the last empty line if the file ends with a newline
- if (fileLines.length > 0 && fileLines[fileLines.length - 1] === '') {
- fileLines.pop();
- }
+ // Remove the last empty line if the file ends with a newline
+ if (fileLines.length > 0 && fileLines[fileLines.length - 1] === '') {
+ fileLines.pop();
+ }
- lines.push(...fileLines);
- } catch (error) {
- if (error instanceof Error) {
- if (error.message.includes('ENOENT') || error.message.includes('not found')) {
- return createErrorResult(`${this.name}: ${file}: No such file or directory`);
- } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
- return createErrorResult(`${this.name}: ${file}: Permission denied`);
+ lines.push(...fileLines);
+ } catch (error) {
+ if (error instanceof Error) {
+ if (error.message.includes('ENOENT') || error.message.includes('not found')) {
+ return createErrorResult(`${this.name}: ${file}: No such file or directory`);
+ } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
+ return createErrorResult(`${this.name}: ${file}: Permission denied`);
+ } else {
+ return createErrorResult(`${this.name}: ${file}: ${error.message}`);
+ }
} else {
- return createErrorResult(`${this.name}: ${file}: ${error.message}`);
+ return createErrorResult(`${this.name}: ${file}: Unknown error`);
}
- } else {
- return createErrorResult(`${this.name}: ${file}: Unknown error`);
}
}
- }
}
// Process lines
diff --git a/src/lib/commands/git/show.ts b/src/lib/commands/git/show.ts
index dd61b5e2..5f1ec8b4 100644
--- a/src/lib/commands/git/show.ts
+++ b/src/lib/commands/git/show.ts
@@ -388,29 +388,29 @@ export class GitShowCommand implements GitSubcommand {
lines.push('');
// List changed files
- if (added.length > 0) {
- lines.push('\x1b[1mAdded files:\x1b[0m');
- for (const change of added) {
- lines.push(` \x1b[32mnew file: ${change.path}\x1b[0m`); // Green for new files
- }
- lines.push('');
- }
+ if (added.length > 0) {
+ lines.push('\x1b[1mAdded files:\x1b[0m');
+ for (const change of added) {
+ lines.push(` \x1b[32mnew file: ${change.path}\x1b[0m`); // Green for new files
+ }
+ lines.push('');
+ }
- if (modified.length > 0) {
- lines.push('\x1b[1mModified files:\x1b[0m');
- for (const change of modified) {
- lines.push(` \x1b[33mmodified: ${change.path}\x1b[0m`); // Yellow for modified files
- }
- lines.push('');
- }
+ if (modified.length > 0) {
+ lines.push('\x1b[1mModified files:\x1b[0m');
+ for (const change of modified) {
+ lines.push(` \x1b[33mmodified: ${change.path}\x1b[0m`); // Yellow for modified files
+ }
+ lines.push('');
+ }
- if (deleted.length > 0) {
- lines.push('\x1b[1mDeleted files:\x1b[0m');
- for (const change of deleted) {
- lines.push(` \x1b[31mdeleted: ${change.path}\x1b[0m`); // Red for deleted files
- }
- lines.push('');
- }
+ if (deleted.length > 0) {
+ lines.push('\x1b[1mDeleted files:\x1b[0m');
+ for (const change of deleted) {
+ lines.push(` \x1b[31mdeleted: ${change.path}\x1b[0m`); // Red for deleted files
+ }
+ lines.push('');
+ }
// Show actual diffs for modified files (up to 3 files to avoid excessive output)
if (modified.length > 0) {
@@ -426,9 +426,9 @@ export class GitShowCommand implements GitSubcommand {
}
for (const change of filesToShow) {
- lines.push(`\x1b[1mdiff --git a/${change.path} b/${change.path}\x1b[0m`); // Bold
- lines.push(`\x1b[1;31m--- a/${change.path}\x1b[0m`); // Bold red
- lines.push(`\x1b[1;32m+++ b/${change.path}\x1b[0m`); // Bold green
+ lines.push(`\x1b[1mdiff --git a/${change.path} b/${change.path}\x1b[0m`); // Bold
+ lines.push(`\x1b[1;31m--- a/${change.path}\x1b[0m`); // Bold red
+ lines.push(`\x1b[1;32m+++ b/${change.path}\x1b[0m`); // Bold green
try {
// Get file content from parent commit
diff --git a/src/lib/commands/sort.ts b/src/lib/commands/sort.ts
index 07010429..054896f1 100644
--- a/src/lib/commands/sort.ts
+++ b/src/lib/commands/sort.ts
@@ -32,42 +32,42 @@ export class SortCommand implements ShellCommand {
} else {
// Read all files
for (const file of files) {
- try {
+ try {
// Handle absolute paths
- if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
- return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
- }
+ if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
+ return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
+ }
- const absolutePath = join(cwd, file);
- const stats = await this.fs.stat(absolutePath);
+ const absolutePath = join(cwd, file);
+ const stats = await this.fs.stat(absolutePath);
- if (stats.isDirectory()) {
- return createErrorResult(`${this.name}: read error: ${file}: Is a directory`);
- }
+ if (stats.isDirectory()) {
+ return createErrorResult(`${this.name}: read error: ${file}: Is a directory`);
+ }
- const content = await this.fs.readFile(absolutePath, 'utf8');
- const fileLines = content.split('\n');
+ const content = await this.fs.readFile(absolutePath, 'utf8');
+ const fileLines = content.split('\n');
- // Remove the last empty line if the file ends with a newline
- if (fileLines.length > 0 && fileLines[fileLines.length - 1] === '') {
- fileLines.pop();
- }
+ // Remove the last empty line if the file ends with a newline
+ if (fileLines.length > 0 && fileLines[fileLines.length - 1] === '') {
+ fileLines.pop();
+ }
- lines.push(...fileLines);
- } catch (error) {
- if (error instanceof Error) {
- if (error.message.includes('ENOENT') || error.message.includes('not found')) {
- return createErrorResult(`${this.name}: open failed: ${file}: No such file or directory`);
- } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
- return createErrorResult(`${this.name}: open failed: ${file}: Permission denied`);
+ lines.push(...fileLines);
+ } catch (error) {
+ if (error instanceof Error) {
+ if (error.message.includes('ENOENT') || error.message.includes('not found')) {
+ return createErrorResult(`${this.name}: open failed: ${file}: No such file or directory`);
+ } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
+ return createErrorResult(`${this.name}: open failed: ${file}: Permission denied`);
+ } else {
+ return createErrorResult(`${this.name}: open failed: ${file}: ${error.message}`);
+ }
} else {
- return createErrorResult(`${this.name}: open failed: ${file}: ${error.message}`);
+ return createErrorResult(`${this.name}: open failed: ${file}: Unknown error`);
}
- } else {
- return createErrorResult(`${this.name}: open failed: ${file}: Unknown error`);
}
}
- }
}
// Sort the lines
diff --git a/src/lib/commands/tr.ts b/src/lib/commands/tr.ts
index e39b03b2..a704a695 100644
--- a/src/lib/commands/tr.ts
+++ b/src/lib/commands/tr.ts
@@ -41,35 +41,35 @@ export class TrCommand implements ShellCommand {
} else {
// Read all files
for (const file of files) {
- try {
+ try {
// Handle absolute paths
- if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
- return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
- }
+ if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
+ return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
+ }
- const absolutePath = join(cwd, file);
- const stats = await this.fs.stat(absolutePath);
+ const absolutePath = join(cwd, file);
+ const stats = await this.fs.stat(absolutePath);
- if (stats.isDirectory()) {
- return createErrorResult(`${this.name}: ${file}: Is a directory`);
- }
+ if (stats.isDirectory()) {
+ return createErrorResult(`${this.name}: ${file}: Is a directory`);
+ }
- const fileContent = await this.fs.readFile(absolutePath, 'utf8');
- content += fileContent;
- } catch (error) {
- if (error instanceof Error) {
- if (error.message.includes('ENOENT') || error.message.includes('not found')) {
- return createErrorResult(`${this.name}: ${file}: No such file or directory`);
- } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
- return createErrorResult(`${this.name}: ${file}: Permission denied`);
+ const fileContent = await this.fs.readFile(absolutePath, 'utf8');
+ content += fileContent;
+ } catch (error) {
+ if (error instanceof Error) {
+ if (error.message.includes('ENOENT') || error.message.includes('not found')) {
+ return createErrorResult(`${this.name}: ${file}: No such file or directory`);
+ } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
+ return createErrorResult(`${this.name}: ${file}: Permission denied`);
+ } else {
+ return createErrorResult(`${this.name}: ${file}: ${error.message}`);
+ }
} else {
- return createErrorResult(`${this.name}: ${file}: ${error.message}`);
+ return createErrorResult(`${this.name}: ${file}: Unknown error`);
}
- } else {
- return createErrorResult(`${this.name}: ${file}: Unknown error`);
}
}
- }
}
// Process content
diff --git a/src/lib/commands/uniq.ts b/src/lib/commands/uniq.ts
index 6b0ccd1e..03e4d981 100644
--- a/src/lib/commands/uniq.ts
+++ b/src/lib/commands/uniq.ts
@@ -32,36 +32,36 @@ export class UniqCommand implements ShellCommand {
} else {
try {
// Handle absolute paths
- if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
- return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
- }
+ if (file.startsWith('/') || file.startsWith('\\') || /^[A-Za-z]:[\\/]/.test(file)) {
+ return createErrorResult(`${this.name}: absolute paths are not supported: ${file}`);
+ }
- const absolutePath = join(cwd, file);
- const stats = await this.fs.stat(absolutePath);
+ const absolutePath = join(cwd, file);
+ const stats = await this.fs.stat(absolutePath);
- if (stats.isDirectory()) {
- return createErrorResult(`${this.name}: ${file}: Is a directory`);
- }
+ if (stats.isDirectory()) {
+ return createErrorResult(`${this.name}: ${file}: Is a directory`);
+ }
- const content = await this.fs.readFile(absolutePath, 'utf8');
- lines = content.split('\n');
+ const content = await this.fs.readFile(absolutePath, 'utf8');
+ lines = content.split('\n');
- // Remove the last empty line if the file ends with a newline
- if (lines.length > 0 && lines[lines.length - 1] === '') {
- lines.pop();
- }
- } catch (error) {
- if (error instanceof Error) {
- if (error.message.includes('ENOENT') || error.message.includes('not found')) {
- return createErrorResult(`${this.name}: ${file}: No such file or directory`);
- } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
- return createErrorResult(`${this.name}: ${file}: Permission denied`);
+ // Remove the last empty line if the file ends with a newline
+ if (lines.length > 0 && lines[lines.length - 1] === '') {
+ lines.pop();
+ }
+ } catch (error) {
+ if (error instanceof Error) {
+ if (error.message.includes('ENOENT') || error.message.includes('not found')) {
+ return createErrorResult(`${this.name}: ${file}: No such file or directory`);
+ } else if (error.message.includes('EACCES') || error.message.includes('permission')) {
+ return createErrorResult(`${this.name}: ${file}: Permission denied`);
+ } else {
+ return createErrorResult(`${this.name}: ${file}: ${error.message}`);
+ }
} else {
- return createErrorResult(`${this.name}: ${file}: ${error.message}`);
+ return createErrorResult(`${this.name}: ${file}: Unknown error`);
}
- } else {
- return createErrorResult(`${this.name}: ${file}: Unknown error`);
- }
}
}
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx
index 2803d804..e2c4232e 100644
--- a/src/pages/Index.tsx
+++ b/src/pages/Index.tsx
@@ -296,7 +296,7 @@ export default function Index() {
{/* Chat Input Container - matching the ChatPane style */}
-
-
-
- {children}
-
-
-
+
+
+
+ {children}
+
+
+
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 8e0be2df..0b29795b 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -4,108 +4,108 @@ import typography from "@tailwindcss/typography";
import safeArea from "tailwindcss-safe-area";
export default {
- darkMode: ["class"],
- content: [
- "./pages/**/*.{ts,tsx}",
- "./components/**/*.{ts,tsx}",
- "./app/**/*.{ts,tsx}",
- "./src/**/*.{ts,tsx}",
- "./node_modules/streamdown/dist/index.js",
- ],
- prefix: "",
- theme: {
- container: {
- center: true,
- padding: '2rem',
- screens: {
- '2xl': '1400px'
- }
- },
- extend: {
- fontFamily: {
- sans: ['Inter Variable', 'Inter', 'system-ui', 'sans-serif'],
- },
- colors: {
- border: 'hsl(var(--border))',
- input: 'hsl(var(--input))',
- ring: 'hsl(var(--ring))',
- background: 'hsl(var(--background))',
- foreground: 'hsl(var(--foreground))',
- primary: {
- DEFAULT: 'hsl(var(--primary))',
- foreground: 'hsl(var(--primary-foreground))'
- },
- secondary: {
- DEFAULT: 'hsl(var(--secondary))',
- foreground: 'hsl(var(--secondary-foreground))'
- },
- destructive: {
- DEFAULT: 'hsl(var(--destructive))',
- foreground: 'hsl(var(--destructive-foreground))'
- },
- muted: {
- DEFAULT: 'hsl(var(--muted))',
- foreground: 'hsl(var(--muted-foreground))'
- },
- accent: {
- DEFAULT: 'hsl(var(--accent))',
- foreground: 'hsl(var(--accent-foreground))'
- },
- popover: {
- DEFAULT: 'hsl(var(--popover))',
- foreground: 'hsl(var(--popover-foreground))'
- },
- card: {
- DEFAULT: 'hsl(var(--card))',
- foreground: 'hsl(var(--card-foreground))'
- },
- sidebar: {
- DEFAULT: 'hsl(var(--sidebar-background))',
- foreground: 'hsl(var(--sidebar-foreground))',
- primary: 'hsl(var(--sidebar-primary))',
- 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
- accent: 'hsl(var(--sidebar-accent))',
- 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
- border: 'hsl(var(--sidebar-border))',
- ring: 'hsl(var(--sidebar-ring))'
- },
- success: {
- DEFAULT: 'hsl(var(--success))',
- foreground: 'hsl(var(--success-foreground))'
- },
- warning: {
- DEFAULT: 'hsl(var(--warning))',
- foreground: 'hsl(var(--warning-foreground))'
- }
- },
- borderRadius: {
- lg: 'var(--radius)',
- md: 'calc(var(--radius) - 2px)',
- sm: 'calc(var(--radius) - 4px)'
- },
- keyframes: {
- 'accordion-down': {
- from: {
- height: '0'
- },
- to: {
- height: 'var(--radix-accordion-content-height)'
- }
- },
- 'accordion-up': {
- from: {
- height: 'var(--radix-accordion-content-height)'
- },
- to: {
- height: '0'
- }
- }
- },
- animation: {
- 'accordion-down': 'accordion-down 0.2s ease-out',
- 'accordion-up': 'accordion-up 0.2s ease-out'
- }
- }
- },
- plugins: [tailwindcssAnimate, typography, safeArea],
+ darkMode: ["class"],
+ content: [
+ "./pages/**/*.{ts,tsx}",
+ "./components/**/*.{ts,tsx}",
+ "./app/**/*.{ts,tsx}",
+ "./src/**/*.{ts,tsx}",
+ "./node_modules/streamdown/dist/index.js",
+ ],
+ prefix: "",
+ theme: {
+ container: {
+ center: true,
+ padding: '2rem',
+ screens: {
+ '2xl': '1400px'
+ }
+ },
+ extend: {
+ fontFamily: {
+ sans: ['Inter Variable', 'Inter', 'system-ui', 'sans-serif'],
+ },
+ colors: {
+ border: 'hsl(var(--border))',
+ input: 'hsl(var(--input))',
+ ring: 'hsl(var(--ring))',
+ background: 'hsl(var(--background))',
+ foreground: 'hsl(var(--foreground))',
+ primary: {
+ DEFAULT: 'hsl(var(--primary))',
+ foreground: 'hsl(var(--primary-foreground))'
+ },
+ secondary: {
+ DEFAULT: 'hsl(var(--secondary))',
+ foreground: 'hsl(var(--secondary-foreground))'
+ },
+ destructive: {
+ DEFAULT: 'hsl(var(--destructive))',
+ foreground: 'hsl(var(--destructive-foreground))'
+ },
+ muted: {
+ DEFAULT: 'hsl(var(--muted))',
+ foreground: 'hsl(var(--muted-foreground))'
+ },
+ accent: {
+ DEFAULT: 'hsl(var(--accent))',
+ foreground: 'hsl(var(--accent-foreground))'
+ },
+ popover: {
+ DEFAULT: 'hsl(var(--popover))',
+ foreground: 'hsl(var(--popover-foreground))'
+ },
+ card: {
+ DEFAULT: 'hsl(var(--card))',
+ foreground: 'hsl(var(--card-foreground))'
+ },
+ sidebar: {
+ DEFAULT: 'hsl(var(--sidebar-background))',
+ foreground: 'hsl(var(--sidebar-foreground))',
+ primary: 'hsl(var(--sidebar-primary))',
+ 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
+ accent: 'hsl(var(--sidebar-accent))',
+ 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
+ border: 'hsl(var(--sidebar-border))',
+ ring: 'hsl(var(--sidebar-ring))'
+ },
+ success: {
+ DEFAULT: 'hsl(var(--success))',
+ foreground: 'hsl(var(--success-foreground))'
+ },
+ warning: {
+ DEFAULT: 'hsl(var(--warning))',
+ foreground: 'hsl(var(--warning-foreground))'
+ }
+ },
+ borderRadius: {
+ lg: 'var(--radius)',
+ md: 'calc(var(--radius) - 2px)',
+ sm: 'calc(var(--radius) - 4px)'
+ },
+ keyframes: {
+ 'accordion-down': {
+ from: {
+ height: '0'
+ },
+ to: {
+ height: 'var(--radix-accordion-content-height)'
+ }
+ },
+ 'accordion-up': {
+ from: {
+ height: 'var(--radix-accordion-content-height)'
+ },
+ to: {
+ height: '0'
+ }
+ }
+ },
+ animation: {
+ 'accordion-down': 'accordion-down 0.2s ease-out',
+ 'accordion-up': 'accordion-up 0.2s ease-out'
+ }
+ }
+ },
+ plugins: [tailwindcssAnimate, typography, safeArea],
} satisfies Config;