72 lines
16 KiB
JSON
72 lines
16 KiB
JSON
{
|
|
// Font Family
|
|
"editor.fontFamily": "'Fira Code', 'Cascadia Code', 'Consolas'",
|
|
|
|
// Enable Font Ligatures
|
|
"editor.fontLigatures": true,
|
|
|
|
// Javascript and TypeScript settings
|
|
"js/ts.suggest.enabled": true,
|
|
"js/ts.suggest.autoImports": true,
|
|
"js/ts.preferences.importModuleSpecifier": "shortest",
|
|
|
|
"js/ts.suggest.completeFunctionCalls": true,
|
|
"js/ts.suggest.includeAutomaticOptionalChainCompletions": true,
|
|
"js/ts.suggestionActions.enabled": true,
|
|
"js/ts.autoClosingTags.enabled": true,
|
|
|
|
"editor.quickSuggestions": {
|
|
"strings": "on"
|
|
},
|
|
|
|
"[typescript]": {
|
|
"editor.defaultFormatter": "biomejs.biome"
|
|
},
|
|
"[typescriptreact]": {
|
|
"editor.defaultFormatter": "biomejs.biome"
|
|
},
|
|
"[javascript]": {
|
|
"editor.defaultFormatter": "biomejs.biome"
|
|
},
|
|
"[javascriptreact]": {
|
|
"editor.defaultFormatter": "biomejs.biome"
|
|
},
|
|
"[json]": {
|
|
"editor.defaultFormatter": "vscode.json-language-features"
|
|
},
|
|
"[jsonc]": {
|
|
"editor.defaultFormatter": "biomejs.biome"
|
|
},
|
|
|
|
// Codex OpenAI
|
|
"codex.enableAutoSuggest": true,
|
|
"codex.contextAwareness": true,
|
|
"codex.cloudTasks": true,
|
|
"codex.panelPosition": "right",
|
|
"codex.maxContextLines": 1000,
|
|
|
|
// Biome
|
|
"biome.enabled": true,
|
|
"editor.defaultFormatter": "biomejs.biome",
|
|
"editor.formatOnSave": true,
|
|
"editor.formatOnPaste": false,
|
|
"editor.codeActionsOnSave": {
|
|
"source.organizeImports.biome": "explicit",
|
|
"source.fixAll.biome": "explicit",
|
|
"source.removeUnusedImports": "always",
|
|
"source.fixAll.eslint": "explicit"
|
|
},
|
|
|
|
// other vscode settings
|
|
"[sql]": {
|
|
"editor.defaultFormatter": "cweijan.vscode-mysql-client2"
|
|
},
|
|
"chat.tools.terminal.autoApprove": {
|
|
"/^cd /home/rodax/Documentos/uecko-erp/apps/web/src/layout && python3 - <<'PY'\nfrom pathlib import Path\nfiles = \\{\n 'app-layout\\.tsx': '''import type \\* as React from \"react\"\nimport \\{ SidebarInset, SidebarProvider \\} from \"@repo/shadcn-ui/components\"\nimport \\{ Outlet \\} from \"react-router\"\n\nimport \\{ AppMain \\} from \"\\./app-main\"\nimport \\{ AppSidebar \\} from \"\\./app-sidebar\"\nimport \\{ AppTopbar \\} from \"\\./app-topbar\"\n\nexport const AppLayout = \\(\\) => \\{\n return \\(\n <SidebarProvider\n style=\\{\n \\{\n \"--sidebar-width\": \"16rem\",\n \"--sidebar-width-mobile\": \"18rem\",\n \\} as React\\.CSSProperties\n \\}\n >\n <AppSidebar />\n <SidebarInset className=\"flex h-screen min-w-0 flex-col overflow-hidden bg-background\">\n <AppTopbar />\n <AppMain>\n <Outlet />\n </AppMain>\n </SidebarInset>\n </SidebarProvider>\n \\)\n\\}\n''',\n 'app-main\\.tsx': '''import type \\* as React from \"react\"\n\nimport \\{ cn \\} from \"@repo/shadcn-ui/utils\"\n\ninterface AppMainProps \\{\n children: React\\.ReactNode\n className\\?: string\n\\}\n\nexport const AppMain = \\(\\{ children, className \\}: AppMainProps\\) => \\{\n return \\(\n <main className=\\{cn\\(\"min-h-0 flex-1 overflow-auto bg-muted/40\", className\\)\\}>\n \\{children\\}\n </main>\n \\)\n\\}\n''',\n 'app-sidebar\\.config\\.ts': '''import \\{\n BanknoteIcon,\n BarChart3Icon,\n BoxesIcon,\n Building2Icon,\n ClipboardListIcon,\n CoinsIcon,\n CreditCardIcon,\n FileTextIcon,\n LandmarkIcon,\n PackageIcon,\n PercentIcon,\n ReceiptIcon,\n RefreshCcwIcon,\n SettingsIcon,\n ShoppingCartIcon,\n SlidersHorizontalIcon,\n TruckIcon,\n UserCogIcon,\n UsersIcon,\n WarehouseIcon,\n\\} from \"lucide-react\"\nimport type \\{ LucideIcon \\} from \"lucide-react\"\n\nexport interface AppSidebarNavItem \\{\n title: string\n href: string\n icon: LucideIcon\n\\}\n\nexport interface AppSidebarNavSection \\{\n title: string\n items: AppSidebarNavItem\\[\\]\n\\}\n\nexport const appSidebarNavSections: AppSidebarNavSection\\[\\] = \\[\n \\{\n title: \"Ventas\",\n items: \\[\n \\{ title: \"Proformas\", href: \"/proformas\", icon: FileTextIcon \\},\n \\{ title: \"Pedidos de venta\", href: \"/sales-orders\", icon: ShoppingCartIcon \\},\n \\{ title: \"Clientes\", href: \"/customers\", icon: UsersIcon \\},\n \\{ title: \"Facturación\", href: \"/customer-invoices\", icon: ReceiptIcon \\},\n \\{ title: \"Cobros\", href: \"/collections\", icon: CreditCardIcon \\},\n \\{ title: \"Devoluciones\", href: \"/sales-returns\", icon: RefreshCcwIcon \\},\n \\],\n \\},\n \\{\n title: \"Compras\",\n items: \\[\n \\{ title: \"Pedidos de compra\", href: \"/purchase-orders\", icon: ClipboardListIcon \\},\n \\{ title: \"Proveedores\", href: \"/suppliers\", icon: TruckIcon \\},\n \\{ title: \"Facturas de compra\", href: \"/supplier-invoices\", icon: ReceiptIcon \\},\n \\{ title: \"Pagos\", href: \"/payments\", icon: BanknoteIcon \\},\n \\{ title: \"Devoluciones\", href: \"/purchase-returns\", icon: RefreshCcwIcon \\},\n \\],\n \\},\n \\{\n title: \"Inventario\",\n items: \\[\n \\{ title: \"Productos\", href: \"/products\", icon: PackageIcon \\},\n \\{ title: \"Almacenes\", href: \"/warehouses\", icon: WarehouseIcon \\},\n \\{ title: \"Movimientos\", href: \"/stock-movements\", icon: BoxesIcon \\},\n \\{ title: \"Ajustes de stock\", href: \"/stock-adjustments\", icon: SlidersHorizontalIcon \\},\n \\{ title: \"Categorías\", href: \"/product-categories\", icon: ClipboardListIcon \\},\n \\],\n \\},\n \\{\n title: \"Contabilidad\",\n items: \\[\n \\{ title: \"Plan contable\", href: \"/accounting/chart\", icon: LandmarkIcon \\},\n \\{ title: \"Asientos contables\", href: \"/accounting/entries\", icon: FileTextIcon \\},\n \\{ title: \"Diario\", href: \"/accounting/journal\", icon: ClipboardListIcon \\},\n \\{ title: \"Informes financieros\", href: \"/accounting/reports\", icon: BarChart3Icon \\},\n \\],\n \\},\n \\{\n title: \"Configuración\",\n items: \\[\n \\{ title: \"Usuarios y roles\", href: \"/settings/users\", icon: UserCogIcon \\},\n \\{ title: \"Impuestos\", href: \"/settings/taxes\", icon: PercentIcon \\},\n \\{ title: \"Monedas\", href: \"/settings/currencies\", icon: CoinsIcon \\},\n \\{ title: \"Empresas\", href: \"/settings/companies\", icon: Building2Icon \\},\n \\{ title: \"Parámetros\", href: \"/settings\", icon: SettingsIcon \\},\n \\],\n \\},\n\\]\n''',\n 'app-sidebar\\.tsx': '''import type \\* as React from \"react\"\nimport \\{\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarHeader,\n SidebarRail,\n SidebarTrigger,\n\\} from \"@repo/shadcn-ui/components\"\nimport \\{ cn \\} from \"@repo/shadcn-ui/utils\"\n\nimport \\{ AppSidebarNav \\} from \"\\./app-sidebar-nav\"\nimport \\{ appSidebarNavSections \\} from \"\\./app-sidebar\\.config\"\n\ninterface AppSidebarProps \\{\n className\\?: string\n\\}\n\nexport const AppSidebar = \\(\\{ className \\}: AppSidebarProps\\) => \\{\n return \\(\n <Sidebar\n collapsible=\"icon\"\n className=\\{cn\\(\n \"border-r border-sidebar-border bg-sidebar text-sidebar-foreground\",\n className\n \\)\\}\n >\n <SidebarHeader className=\"h-14 border-b border-sidebar-border px-3\">\n <div className=\"flex h-full items-center gap-2\">\n <div className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-sidebar-accent text-xs font-semibold text-sidebar-accent-foreground\">\n ERP\n </div>\n\n <div className=\"min-w-0 flex-1 overflow-hidden group-data-\\[collapsible=icon\\]:hidden\">\n <p className=\"truncate text-sm font-semibold text-sidebar-foreground\">\n Mi Empresa\n </p>\n </div>\n\n <SidebarTrigger className=\"ml-auto size-7 text-sidebar-foreground/80 group-data-\\[collapsible=icon\\]:hidden\" />\n </div>\n </SidebarHeader>\n\n <SidebarContent className=\"px-2 py-2\">\n <AppSidebarNav sections=\\{appSidebarNavSections\\} />\n </SidebarContent>\n\n <SidebarFooter className=\"border-t border-sidebar-border p-2\">\n <div className=\"flex h-9 items-center gap-2 rounded-md px-2 text-sm text-sidebar-foreground\">\n <div className=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-xs font-medium text-sidebar-accent-foreground\">\n AM\n </div>\n <div className=\"min-w-0 overflow-hidden group-data-\\[collapsible=icon\\]:hidden\">\n <p className=\"truncate font-medium\">Ana Martínez</p>\n <p className=\"truncate text-xs text-sidebar-foreground/70\">\n Administrador\n </p>\n </div>\n </div>\n </SidebarFooter>\n\n <SidebarRail />\n </Sidebar>\n \\)\n\\}\n''',\n 'app-sidebar-nav\\.tsx': '''import type \\{ AppSidebarNavSection \\} from \"\\./app-sidebar\\.config\"\nimport \\{ NavLink \\} from \"react-router\"\nimport \\{\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n\\} from \"@repo/shadcn-ui/components\"\nimport \\{ cn \\} from \"@repo/shadcn-ui/utils\"\n\ninterface AppSidebarNavProps \\{\n sections: AppSidebarNavSection\\[\\]\n\\}\n\nexport const AppSidebarNav = \\(\\{ sections \\}: AppSidebarNavProps\\) => \\{\n return \\(\n <nav className=\"space-y-1\">\n \\{sections\\.map\\(\\(section\\) => \\(\n <SidebarGroup\n key=\\{section\\.title\\}\n className=\"border-b border-sidebar-border/70 px-0 py-2 last:border-b-0\"\n >\n <SidebarGroupLabel className=\"px-2 text-\\[0\\.68rem\\] font-semibold uppercase tracking-\\[0\\.18em\\] text-sidebar-foreground/60 group-data-\\[collapsible=icon\\]:sr-only\">\n \\{section\\.title\\}\n </SidebarGroupLabel>\n\n <SidebarGroupContent>\n <SidebarMenu>\n \\{section\\.items\\.map\\(\\(item\\) => \\{\n const Icon = item\\.icon\n\n return \\(\n <SidebarMenuItem key=\\{item\\.href\\}>\n <SidebarMenuButton\n render=\\{\n <NavLink\n to=\\{item\\.href\\}\n className=\\{\\(\\{ isActive \\}\\) =>\n cn\\(\n \"flex h-8 min-w-0 items-center gap-2 rounded-md px-2 text-sm font-medium transition-colors duration-150\",\n \"text-sidebar-foreground/85 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n isActive && \"bg-sidebar-accent text-sidebar-accent-foreground\"\n \\)\n \\}\n >\n <Icon className=\"size-4 shrink-0\" aria-hidden=\"true\" />\n <span className=\"truncate group-data-\\[collapsible=icon\\]:hidden\">\n \\{item\\.title\\}\n </span>\n </NavLink>\n \\}\n tooltip=\\{item\\.title\\}\n />\n </SidebarMenuItem>\n \\)\n \\}\\)\\}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n \\)\\)\\}\n </nav>\n \\)\n\\}\n''',\n 'app-topbar\\.tsx': '''import \\{\n BellIcon,\n ChevronDownIcon,\n MessageSquareIcon,\n SearchIcon,\n\\} from \"lucide-react\"\nimport \\{\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n Input,\n SidebarTrigger,\n\\} from \"@repo/shadcn-ui/components\"\n\nexport const AppTopbar = \\(\\) => \\{\n return \\(\n <header className=\"flex h-14 shrink-0 items-center border-b border-border bg-background\">\n <div className=\"flex h-full min-w-0 flex-1 items-center gap-3 px-4\">\n <SidebarTrigger className=\"size-8 md:hidden\" />\n\n <div className=\"relative w-full max-w-xl\">\n <SearchIcon\n className=\"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <Input\n type=\"search\"\n placeholder=\"Búsqueda global\\.\\.\\.\"\n className=\"h-9 rounded-md border-border bg-background pl-9 pr-12 text-sm\"\n />\n <kbd className=\"pointer-events-none absolute right-2 top-1/2 hidden -translate-y-1/2 rounded border border-border bg-muted px-1\\.5 py-0\\.5 font-mono text-\\[0\\.68rem\\] text-muted-foreground md:inline-flex\">\n ⌘K\n </kbd>\n </div>\n </div>\n\n <div className=\"flex h-full items-center border-l border-border\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"relative h-full w-12 rounded-none border-r border-border\"\n aria-label=\"Ver notificaciones\"\n >\n <BellIcon className=\"size-4\" aria-hidden=\"true\" />\n <span className=\"absolute right-3 top-3 flex h-4 min-w-\\[1rem\\] items-center justify-center rounded-full bg-primary text-\\[0\\.62rem\\] font-semibold text-primary-foreground\">\n 3\n </span>\n </Button>\n\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"relative h-full w-12 rounded-none border-r border-border\"\n aria-label=\"Ver mensajes\"\n >\n <MessageSquareIcon className=\"size-4\" aria-hidden=\"true\" />\n <span className=\"absolute right-3 top-3 flex h-4 min-w-\\[1rem\\] items-center justify-center rounded-full bg-primary text-\\[0\\.62rem\\] font-semibold text-primary-foreground\">\n 7\n </span>\n </Button>\n\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n className=\"h-full gap-3 rounded-none px-4\"\n aria-label=\"Abrir menú de usuario\"\n >\n <span className=\"flex h-8 w-8 items-center justify-center rounded-full bg-muted text-sm font-semibold text-foreground\">\n AM\n </span>\n <span className=\"hidden min-w-0 text-left md:block\">\n <span className=\"block truncate text-sm font-semibold leading-4\">\n Ana Martínez\n </span>\n <span className=\"block truncate text-xs font-normal text-muted-foreground\">\n Administrador\n </span>\n </span>\n <ChevronDownIcon className=\"hidden size-4 text-muted-foreground md:block\" />\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n <DropdownMenuLabel>Mi cuenta</DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuItem>Perfil</DropdownMenuItem>\n <DropdownMenuItem>Preferencias</DropdownMenuItem>\n <DropdownMenuItem>Cerrar sesión</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n </header>\n \\)\n\\}\n'''\n\\}\nfor name, content in files\\.items\\(\\):\n Path\\(name\\)\\.write_text\\(content, encoding='utf-8'\\)\nPY$/": {
|
|
"approve": true,
|
|
"matchCommandLine": true
|
|
},
|
|
"pnpm": true
|
|
} // <- your root font size here
|
|
}
|