From 283ff540a886a28e118637120a195a6b124e66f7 Mon Sep 17 00:00:00 2001 From: Samsie Date: Wed, 8 Jul 2026 13:22:26 +0530 Subject: [PATCH] feat: implement PDF export for income statement and tax report --- .../income-statement/export-options.tsx | 100 ++++++- .../tax-report-export/export-options.tsx | 61 ++++- app/routes/income-statement.tsx | 2 +- app/routes/tax-report-export.tsx | 2 +- package-lock.json | 253 +++++++++++++++++- package.json | 2 + 6 files changed, 398 insertions(+), 22 deletions(-) diff --git a/app/blocks/income-statement/export-options.tsx b/app/blocks/income-statement/export-options.tsx index a6793c8..a4edf18 100644 --- a/app/blocks/income-statement/export-options.tsx +++ b/app/blocks/income-statement/export-options.tsx @@ -1,13 +1,107 @@ import { IconDownload, IconFileText } from "@tabler/icons-react"; import styles from "./export-options.module.css"; +import jsPDF from "jspdf"; +import autoTable from "jspdf-autotable"; -interface Props { className?: string; } +interface Props { + className?: string; + sales?: any[]; + expenses?: any[]; +} + +export function ExportOptions({ className, sales = [], expenses = [] }: Props) { + const handleExportPDF = () => { + const doc = new jsPDF(); + + doc.setFontSize(20); + doc.text("FlipTrack Income Statement", 14, 22); + doc.setFontSize(11); + doc.setTextColor(100); + doc.text(`Generated on ${new Date().toLocaleDateString()}`, 14, 30); + + const revenue = sales.reduce((sum, s) => sum + s.salePrice, 0); + const cogs = sales.reduce((sum, s) => sum + (s.inventoryItem?.purchasePrice || 0), 0); + const platformFees = sales.reduce((sum, s) => sum + s.platformFee, 0); + const shippingCosts = sales.reduce((sum, s) => sum + s.shippingCost, 0); + const totalExpenses = expenses.reduce((sum, e) => sum + e.amount, 0); + + const grossProfit = revenue - cogs; + const netProfit = grossProfit - platformFees - shippingCosts - totalExpenses; + + autoTable(doc, { + startY: 40, + head: [["Metric", "Amount"]], + body: [ + ["Total Revenue", `$${revenue.toFixed(2)}`], + ["Cost of Goods Sold (COGS)", `$${cogs.toFixed(2)}`], + ["Gross Profit", `$${grossProfit.toFixed(2)}`], + ["Platform Fees", `$${platformFees.toFixed(2)}`], + ["Shipping Costs", `$${shippingCosts.toFixed(2)}`], + ["Other Expenses", `$${totalExpenses.toFixed(2)}`], + ["Net Profit", `$${netProfit.toFixed(2)}`], + ], + theme: 'grid', + headStyles: { fillColor: [66, 66, 66] }, + }); + + const monthlyData: Record = {}; + + sales.forEach(s => { + const date = new Date(s.saleDate); + const month = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`; + if (!monthlyData[month]) monthlyData[month] = { revenue: 0, costs: 0, expenses: 0 }; + monthlyData[month].revenue += s.salePrice; + monthlyData[month].costs += (s.inventoryItem?.purchasePrice || 0) + s.platformFee + s.shippingCost; + }); + + expenses.forEach(e => { + const date = new Date(e.date); + const month = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`; + if (!monthlyData[month]) monthlyData[month] = { revenue: 0, costs: 0, expenses: 0 }; + monthlyData[month].expenses += e.amount; + }); + + const monthlyRows = Object.entries(monthlyData) + .sort((a, b) => a[0].localeCompare(b[0])) + .map(([month, data]) => [ + month, + `$${data.revenue.toFixed(2)}`, + `$${data.costs.toFixed(2)}`, + `$${data.expenses.toFixed(2)}`, + `$${(data.revenue - data.costs - data.expenses).toFixed(2)}` + ]); + + if (monthlyRows.length > 0) { + autoTable(doc, { + startY: (doc as any).lastAutoTable.finalY + 10, + head: [["Month", "Revenue", "COGS & Fees", "Expenses", "Net Profit"]], + body: monthlyRows, + theme: 'striped', + headStyles: { fillColor: [66, 66, 66] }, + }); + } + + if (expenses.length > 0) { + autoTable(doc, { + startY: (doc as any).lastAutoTable.finalY + 10, + head: [["Date", "Expense Category", "Amount"]], + body: expenses.map(e => [ + new Date(e.date).toLocaleDateString(), + e.category, + `$${e.amount.toFixed(2)}` + ]), + theme: 'striped', + headStyles: { fillColor: [66, 66, 66] }, + }); + } + + doc.save("fliptrack_income_statement.pdf"); + }; -export function ExportOptions({ className }: Props) { return (
Export CSV - +
); } diff --git a/app/blocks/tax-report-export/export-options.tsx b/app/blocks/tax-report-export/export-options.tsx index 774d370..667b048 100644 --- a/app/blocks/tax-report-export/export-options.tsx +++ b/app/blocks/tax-report-export/export-options.tsx @@ -1,11 +1,65 @@ import styles from "./export-options.module.css"; +import jsPDF from "jspdf"; +import autoTable from "jspdf-autotable"; interface Props { taxYear: number; className?: string; + sales?: any[]; + expenses?: any[]; } -export function ExportOptions({ taxYear, className }: Props) { +export function ExportOptions({ taxYear, className, sales = [], expenses = [] }: Props) { + const handleExportPDF = () => { + const doc = new jsPDF(); + + doc.setFontSize(20); + doc.text(`FlipTrack Tax Report - ${taxYear}`, 14, 22); + doc.setFontSize(11); + doc.setTextColor(100); + doc.text(`Generated on ${new Date().toLocaleDateString()}`, 14, 30); + + const revenue = sales.reduce((sum, s) => sum + s.salePrice, 0); + const cogs = sales.reduce((sum, s) => sum + (s.inventoryItem?.purchasePrice || 0), 0); + const platformFees = sales.reduce((sum, s) => sum + s.platformFee, 0); + const shippingCosts = sales.reduce((sum, s) => sum + s.shippingCost, 0); + const totalExpenses = expenses.reduce((sum, e) => sum + e.amount, 0); + + const grossProfit = revenue - cogs; + const netProfit = grossProfit - platformFees - shippingCosts - totalExpenses; + + autoTable(doc, { + startY: 40, + head: [["Tax Summary Metric", "Amount"]], + body: [ + ["Total Revenue", `$${revenue.toFixed(2)}`], + ["Cost of Goods Sold (COGS)", `$${cogs.toFixed(2)}`], + ["Gross Profit", `$${grossProfit.toFixed(2)}`], + ["Deductible Fees (Platform)", `$${platformFees.toFixed(2)}`], + ["Deductible Costs (Shipping)", `$${shippingCosts.toFixed(2)}`], + ["Other Business Expenses", `$${totalExpenses.toFixed(2)}`], + ["Net Taxable Income", `$${netProfit.toFixed(2)}`], + ], + theme: 'grid', + headStyles: { fillColor: [66, 66, 66] }, + }); + + if (expenses.length > 0) { + autoTable(doc, { + startY: (doc as any).lastAutoTable.finalY + 10, + head: [["Date", "Expense Category", "Amount"]], + body: expenses.map(e => [ + new Date(e.date).toLocaleDateString(), + e.category, + `$${e.amount.toFixed(2)}` + ]), + theme: 'striped', + headStyles: { fillColor: [66, 66, 66] }, + }); + } + + doc.save(`fliptrack_tax_report_${taxYear}.pdf`); + }; return (
- + ); } diff --git a/app/routes/tax-report-export.tsx b/app/routes/tax-report-export.tsx index 8dceca1..ace2e48 100644 --- a/app/routes/tax-report-export.tsx +++ b/app/routes/tax-report-export.tsx @@ -83,7 +83,7 @@ export default function TaxReportExportPage() { - + ); diff --git a/package-lock.json b/package-lock.json index 7753209..834d41a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,8 @@ "ai": "^6.0.195", "classnames": "^2.5.1", "isbot": "^5.1.40", + "jspdf": "^4.2.1", + "jspdf-autotable": "^5.0.8", "radix-ui": "^1.4.3", "react": "^19.2.7", "react-dom": "^19.2.7", @@ -519,6 +521,15 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", @@ -2986,6 +2997,19 @@ "undici-types": "~7.16.0" } }, + "node_modules/@types/pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw==", + "license": "MIT" + }, + "node_modules/@types/raf": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz", + "integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==", + "license": "MIT", + "optional": true + }, "node_modules/@types/react": { "version": "19.2.16", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.16.tgz", @@ -3006,6 +3030,13 @@ "@types/react": "^19.2.0" } }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, "node_modules/@types/use-sync-external-store": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", @@ -3177,6 +3208,16 @@ "@babel/types": "^7.23.6" } }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/baseline-browser-mapping": { "version": "2.10.33", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.33.tgz", @@ -3356,6 +3397,26 @@ ], "license": "CC-BY-4.0" }, + "node_modules/canvg": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.11.tgz", + "integrity": "sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA==", + "license": "MIT", + "optional": true, + "dependencies": { + "@babel/runtime": "^7.12.5", + "@types/raf": "^3.4.0", + "core-js": "^3.8.3", + "raf": "^3.4.1", + "regenerator-runtime": "^0.13.7", + "rgbcolor": "^1.0.1", + "stackblur-canvas": "^2.0.0", + "svg-pathdata": "^6.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -3482,6 +3543,18 @@ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", "license": "MIT" }, + "node_modules/core-js": { + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz", + "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -3496,6 +3569,16 @@ "node": ">= 8" } }, + "node_modules/css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "license": "MIT", + "optional": true, + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/csstype": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", @@ -3698,6 +3781,16 @@ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", "license": "MIT" }, + "node_modules/dompurify": { + "version": "3.4.11", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.11.tgz", + "integrity": "sha512-zhlUV12GsaRzMsf9q5M254YhA4+VuF0fG+QFqu6aYpoGlKtz+w8//jBcGVYBgQkR5GHjUomejY84AV+/uPbWdw==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optional": true, + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/dotenv": { "version": "17.4.2", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", @@ -3938,6 +4031,17 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-png": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/fast-png/-/fast-png-6.4.0.tgz", + "integrity": "sha512-kAqZq1TlgBjZcLr5mcN6NP5Rv4V2f22z00c3g8vRrwkcqjerx7BEhPbOnWCPqaHUl2XWQBJQvOT/FQhdMT7X/Q==", + "license": "MIT", + "dependencies": { + "@types/pako": "^2.0.3", + "iobuffer": "^5.3.2", + "pako": "^2.1.0" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -4017,7 +4121,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -4159,6 +4262,20 @@ "node": ">= 0.4" } }, + "node_modules/html2canvas": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", + "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", + "license": "MIT", + "optional": true, + "dependencies": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/http-errors": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", @@ -4234,6 +4351,12 @@ "node": ">=12" } }, + "node_modules/iobuffer": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/iobuffer/-/iobuffer-5.4.0.tgz", + "integrity": "sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA==", + "license": "MIT" + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -4270,18 +4393,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "license": "ISC" }, - "node_modules/jiti": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", - "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, "node_modules/jose": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", @@ -4330,6 +4441,32 @@ "node": ">=6" } }, + "node_modules/jspdf": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-4.2.1.tgz", + "integrity": "sha512-YyAXyvnmjTbR4bHQRLzex3CuINCDlQnBqoSYyjJwTP2x9jDLuKDzy7aKUl0hgx3uhcl7xzg32agn5vlie6HIlQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.6", + "fast-png": "^6.2.0", + "fflate": "^0.8.1" + }, + "optionalDependencies": { + "canvg": "^3.0.11", + "core-js": "^3.6.0", + "dompurify": "^3.3.1", + "html2canvas": "^1.0.0-rc.5" + } + }, + "node_modules/jspdf-autotable": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/jspdf-autotable/-/jspdf-autotable-5.0.8.tgz", + "integrity": "sha512-Hy05N86yBO7CXBrnSLOge7i1ZYpKH2DjQ94iybaP7vBhSInjvRBgDc99ngKzSbSO8Jc98ZCally8I6n0tj2RJQ==", + "license": "MIT", + "peerDependencies": { + "jspdf": "^2 || ^3 || ^4" + } + }, "node_modules/lightningcss": { "version": "1.32.0", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", @@ -4887,6 +5024,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pako": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.2.0.tgz", + "integrity": "sha512-zJq6RP/5q+TO2OpFV3FHzlPnFjmkb7Nc99a5SNjJE+uu/PkpChs+NIZSSzbBoD+6kjiISXjfYdwj1ZRQ81dz/w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "(MIT AND Zlib)" + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -4918,6 +5071,13 @@ "dev": true, "license": "MIT" }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT", + "optional": true + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -5127,6 +5287,16 @@ } } }, + "node_modules/raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "license": "MIT", + "optional": true, + "dependencies": { + "performance-now": "^2.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -5405,12 +5575,29 @@ "redux": "^5.0.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "license": "MIT", + "optional": true + }, "node_modules/reselect": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz", "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==", "license": "MIT" }, + "node_modules/rgbcolor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz", + "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==", + "license": "MIT OR SEE LICENSE IN FEEL-FREE.md", + "optional": true, + "engines": { + "node": ">= 0.8.15" + } + }, "node_modules/rolldown": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz", @@ -5694,6 +5881,16 @@ "source-map": "^0.6.0" } }, + "node_modules/stackblur-canvas": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz", + "integrity": "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.14" + } + }, "node_modules/statuses": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", @@ -5729,6 +5926,26 @@ } } }, + "node_modules/svg-pathdata": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz", + "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "license": "MIT", + "optional": true, + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", @@ -5915,6 +6132,16 @@ "node": ">= 0.4.0" } }, + "node_modules/utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "license": "MIT", + "optional": true, + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, "node_modules/valibot": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/valibot/-/valibot-1.4.1.tgz", diff --git a/package.json b/package.json index 7c1380d..7eb0c0b 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "ai": "^6.0.195", "classnames": "^2.5.1", "isbot": "^5.1.40", + "jspdf": "^4.2.1", + "jspdf-autotable": "^5.0.8", "radix-ui": "^1.4.3", "react": "^19.2.7", "react-dom": "^19.2.7",