mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-02 18:45:21 +00:00

🔄 Dynamic Processing Strategies - Adaptive routing: Same tool uses different backend endpoints based on file analysis - Combined vs separate processing: Intelligently chooses between merge operations and individual file processing - Cross-format workflows: Enable complex conversions like "mixed files → PDF" that other tools can't handle ⚙️ Format-Specific Intelligence Each conversion type gets tailored options: - HTML/ZIP → PDF: Zoom controls (0.1-3.0 increments) with live preview - Email → PDF: Attachment handling, size limits, recipient control - PDF → PDF/A: Digital signature detection with warnings - Images → PDF: Smart combining vs individual file options File Architecture Core Implementation: ├── Convert.tsx # Main stepped workflow UI ├── ConvertSettings.tsx # Centralized settings with smart detection ├── GroupedFormatDropdown.tsx # Enhanced format selector with grouping ├── useConvertParameters.ts # Smart detection & parameter management ├── useConvertOperation.ts # Multi-strategy processing logic └── Settings Components: ├── ConvertFromWebSettings.tsx # HTML zoom controls ├── ConvertFromEmailSettings.tsx # Email attachment options ├── ConvertToPdfaSettings.tsx # PDF/A with signature detection ├── ConvertFromImageSettings.tsx # Image PDF options └── ConvertToImageSettings.tsx # PDF to image options Utility Layer Utils & Services: ├── convertUtils.ts # Format detection & endpoint routing ├── fileResponseUtils.ts # Generic API response handling └── setupTests.ts # Enhanced test environment with crypto mocks Testing & Quality Comprehensive Test Coverage Test Suite: ├── useConvertParameters.test.ts # Parameter logic & smart detection ├── useConvertParametersAutoDetection.test.ts # File type analysis ├── ConvertIntegration.test.tsx # End-to-end conversion workflows ├── ConvertSmartDetectionIntegration.test.tsx # Mixed file scenarios ├── ConvertE2E.spec.ts # Playwright browser tests ├── convertUtils.test.ts # Utility function validation └── fileResponseUtils.test.ts # API response handling Advanced Test Features - Crypto API mocking: Proper test environment for file hashing - File.arrayBuffer() polyfills: Complete browser API simulation - Multi-file scenario testing: Complex batch processing validation - CI/CD integration: Vitest runs in GitHub Actions with proper artifacts --------- Co-authored-by: Connor Yoh <connor@stirlingpdf.com> Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
83 lines
2.3 KiB
JSON
83 lines
2.3 KiB
JSON
{
|
|
"name": "frontend",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"license": "SEE LICENSE IN https://raw.githubusercontent.com/Stirling-Tools/Stirling-PDF/refs/heads/main/proprietary/LICENSE",
|
|
"proxy": "http://localhost:8080",
|
|
"dependencies": {
|
|
"@emotion/react": "^11.14.0",
|
|
"@emotion/styled": "^11.14.0",
|
|
"@mantine/core": "^8.0.1",
|
|
"@mantine/dropzone": "^8.0.1",
|
|
"@mantine/hooks": "^8.0.1",
|
|
"@mui/icons-material": "^7.1.0",
|
|
"@mui/material": "^7.1.0",
|
|
"@tailwindcss/postcss": "^4.1.8",
|
|
"@testing-library/dom": "^10.4.0",
|
|
"@testing-library/jest-dom": "^6.6.3",
|
|
"@testing-library/react": "^16.3.0",
|
|
"@testing-library/user-event": "^13.5.0",
|
|
"autoprefixer": "^10.4.21",
|
|
"axios": "^1.9.0",
|
|
"i18next": "^25.2.1",
|
|
"i18next-browser-languagedetector": "^8.1.0",
|
|
"i18next-http-backend": "^3.0.2",
|
|
"jszip": "^3.10.1",
|
|
"material-symbols": "^0.33.0",
|
|
"pdf-lib": "^1.17.1",
|
|
"pdfjs-dist": "^3.11.174",
|
|
"react": "^19.1.0",
|
|
"react-dom": "^19.1.0",
|
|
"react-i18next": "^15.5.2",
|
|
"react-router-dom": "^7.6.0",
|
|
"tailwindcss": "^4.1.8",
|
|
"web-vitals": "^2.1.4"
|
|
},
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"generate-licenses": "node scripts/generate-licenses.js",
|
|
"test": "vitest",
|
|
"test:watch": "vitest --watch",
|
|
"test:coverage": "vitest --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:ui": "playwright test --ui",
|
|
"test:e2e:install": "playwright install"
|
|
},
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"react-app",
|
|
"react-app/jest"
|
|
]
|
|
},
|
|
"browserslist": {
|
|
"production": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not op_mini all"
|
|
],
|
|
"development": [
|
|
"last 1 chrome version",
|
|
"last 1 firefox version",
|
|
"last 1 safari version"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.40.0",
|
|
"@types/react": "^19.1.4",
|
|
"@types/react-dom": "^19.1.5",
|
|
"@vitejs/plugin-react": "^4.5.0",
|
|
"@vitest/coverage-v8": "^1.0.0",
|
|
"jsdom": "^23.0.0",
|
|
"license-checker": "^25.0.1",
|
|
"postcss": "^8.5.3",
|
|
"postcss-cli": "^11.0.1",
|
|
"postcss-preset-mantine": "^1.17.0",
|
|
"postcss-simple-vars": "^7.0.1",
|
|
"typescript": "^5.8.3",
|
|
"vite": "^6.3.5",
|
|
"vitest": "^1.0.0"
|
|
}
|
|
}
|