Files
wrong-notebook/package.json
margrop 8bfb277940 feat: 照片按真实格式解码,HEIC/HEIF 裁剪前转换,图片按原图裁剪并限制像素与体积
- 按文件头识别真实格式,优先系统解码;无法解码的 HEIC/HEIF 按需加载 heic-to(libheif)转为 JPEG 并按旋转信息摆正
- 区分 HEIC 解码失败、图片无法解码与不是图片,给出明确提示
- 裁剪预览使用缩略图,坐标映射回原图一次裁剪缩放;输出按最长边 4096、约 490 万像素、1.5MB 共同限制,
  质量不低于 0.8,超出体积时缩小尺寸,保护小字与公式;小于 1MB 的大像素图片同样受限
- 遮罩显示读取、转换、裁剪压缩等实际阶段用时,任务记录各阶段毫秒数,日志只含格式、像素、体积和用时
- 批量框选与替换原图使用同一处理流程
2026-11-03 10:00:39 +08:00

91 lines
2.6 KiB
JSON

{
"name": "wrong-notebook",
"version": "2026.10.19",
"private": true,
"license": "MIT",
"scripts": {
"dev": "next dev -H 0.0.0.0",
"build": "next build",
"start": "next start",
"lint": "eslint src --max-warnings=0",
"test": "vitest run",
"test:unit": "vitest run src/__tests__/unit",
"test:integration": "vitest run src/__tests__/integration",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:e2e": "node scripts/run-e2e.mjs",
"test:report": "playwright show-report --host 0.0.0.0"
},
"dependencies": {
"@anthropic-ai/sdk": "^1.3.0",
"@breezystack/lamejs": "1.2.7",
"@google/genai": "^2.32.0",
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/client": "5.22.0",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slider": "^1.3.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"bcryptjs": "^3.0.3",
"date-fns": "^4.1.0",
"date-fns-tz": "^3.2.0",
"dotenv": "^18.0.9",
"global-agent": "^4.1.3",
"heic-to": "1.6.6",
"katex": "^0.19.0",
"next": "~16.4.3",
"next-auth": "^4.24.15",
"openai": "^7.46.0",
"react": "19.3.1",
"react-dom": "19.3.1",
"react-dropzone": "^20.1.4",
"react-image-crop": "^11.0.10",
"react-markdown": "^10.1.0",
"recharts": "^3.5.0",
"rehype-katex": "^7.0.1",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
"remark-math": "^6.0.0",
"strip-markdown": "^6.0.0",
"undici": "^7.16.0",
"zod": "^4.6.7"
},
"devDependencies": {
"@playwright/test": "^1.57.0",
"@tailwindcss/postcss": "^4",
"@types/bcryptjs": "^2.4.6",
"@types/node": "^24.19.2",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitejs/plugin-react": "^6.1.2",
"@vitest/coverage-v8": "^5.0.5",
"baseline-browser-mapping": "^2.8.32",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"eslint": "^9",
"eslint-config-next": "16.4.3",
"jsdom": "^30.1.3",
"lucide-react": "^1.65.0",
"prisma": "5.22.0",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4",
"ts-node": "^10.9.2",
"tw-animate-css": "^1.4.0",
"typescript": "^5",
"vitest": "^5.0.5"
},
"prisma": {
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
},
"overrides": {
"katex": "$katex",
"minimatch": "^11.0.3"
}
}