refactor: split CommandFooter, perf tweaks

- extracted drawer modal to CommandDrawer (~180 lines)
- CommandFooter now under 270 lines
- replaced transition-all with specific props (colors, transform, etc)
- should reduce repaints on hover states
This commit is contained in:
N1C4T
2025-12-31 22:11:19 +04:00
parent 4a70f293c1
commit c3b737f901
47 changed files with 363 additions and 712 deletions

View File

@@ -1,6 +1,4 @@
/**
* Arch Linux script generator with AUR support
*/
// Arch script - handles both pacman and AUR packages
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';
import { isAurPackage } from '../aur';

View File

@@ -1,6 +1,4 @@
/**
* Debian script generator
*/
// Debian script - apt-get with dependency auto-fix
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';

View File

@@ -1,6 +1,4 @@
/**
* Fedora script generator with RPM Fusion support
*/
// Fedora script - dnf with RPM Fusion auto-enable
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';

View File

@@ -1,6 +1,4 @@
/**
* Flatpak script generator with parallel install
*/
// Flatpak script - parallel install when 3+ packages
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';

View File

@@ -1,6 +1,4 @@
/**
* Script generator index - re-exports all distro generators
*/
// Re-exports all distro script generators
export { escapeShellString, getSelectedPackages, type PackageInfo } from './shared';
export { generateUbuntuScript } from './ubuntu';

View File

@@ -1,6 +1,4 @@
/**
* Nix script generator
*/
// Nix script - nix-env
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';

View File

@@ -1,6 +1,4 @@
/**
* openSUSE script generator
*/
// openSUSE script - zypper
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';

View File

@@ -1,6 +1,4 @@
/**
* Shared utilities and types for script generation
*/
// Stuff shared across all distro script generators
import { apps, type DistroId, type AppData } from '../data';
@@ -9,10 +7,7 @@ export interface PackageInfo {
pkg: string;
}
/**
* Escape special characters for safe use in shell scripts
* Prevents injection attacks from malicious app/package names
*/
// Don't let anyone sneak shell commands through app names :)
export function escapeShellString(str: string): string {
return str
.replace(/\\/g, '\\\\') // Escape backslashes first

View File

@@ -1,6 +1,4 @@
/**
* Snap script generator
*/
// Snap script
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';

View File

@@ -1,6 +1,4 @@
/**
* Ubuntu script generator
*/
// Ubuntu script - apt-get with dependency auto-fix
import { generateAsciiHeader, generateSharedUtils, escapeShellString, type PackageInfo } from './shared';