diff --git a/package.json b/package.json index 8dcd335..7776c51 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "@lingui/core": "^5.9.0", "@lingui/macro": "^5.9.0", "@lingui/react": "^5.9.0", - "@react-pdf/renderer": "4.3.2", "@sentry/react": "^10.38.0", "@tauri-apps/api": "^2.10.1", "@tauri-apps/plugin-dialog": "^2.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8972eb8..22b3b48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,9 +32,6 @@ importers: '@lingui/react': specifier: ^5.9.0 version: 5.9.0(@lingui/babel-plugin-lingui-macro@5.9.0(babel-plugin-macros@3.1.0)(typescript@5.9.3))(babel-plugin-macros@3.1.0)(react@18.3.1) - '@react-pdf/renderer': - specifier: 4.3.2 - version: 4.3.2(react@18.3.1) '@sentry/react': specifier: ^10.38.0 version: 10.38.0(react@18.3.1) @@ -1232,21 +1229,25 @@ packages: resolution: {integrity: sha512-TfJkMZjePbLiskmxFXVAbGI/OZtD+y+fwS0wyW8O6DWG0ARTf0AipY9zGwGoOdpFuXOJceXvN4SHGLbYNDMY4Q==} cpu: [arm64] os: [linux] + libc: [glibc] '@oxfmt/linux-arm64-musl@0.28.0': resolution: {integrity: sha512-7fyQUdW203v4WWGr1T3jwTz4L7KX9y5DeATryQ6fLT6QQp9GEuct8/k0lYhd+ys42iTV/IkJF20e3YkfSOOILg==} cpu: [arm64] os: [linux] + libc: [musl] '@oxfmt/linux-x64-gnu@0.28.0': resolution: {integrity: sha512-sRKqAvEonuz0qr1X1ncUZceOBJerKzkO2gZIZmosvy/JmqyffpIFL3OE2tqacFkeDhrC+dNYQpusO8zsfHo3pw==} cpu: [x64] os: [linux] + libc: [glibc] '@oxfmt/linux-x64-musl@0.28.0': resolution: {integrity: sha512-fW6czbXutX/tdQe8j4nSIgkUox9RXqjyxwyWXUDItpoDkoXllq17qbD7GVc0whrEhYQC6hFE1UEAcDypLJoSzw==} cpu: [x64] os: [linux] + libc: [musl] '@oxfmt/win32-arm64@0.28.0': resolution: {integrity: sha512-D/HDeQBAQRjTbD9OLV6kRDcStrIfO+JsUODDCdGmhRfNX8LPCx95GpfyybpZfn3wVF8Jq/yjPXV1xLkQ+s7RcA==} @@ -1272,21 +1273,25 @@ packages: resolution: {integrity: sha512-75tf1HvwdZ3ebk83yMbSB+moAEWK98mYqpXiaFAi6Zshie7r+Cx5PLXZFUEqkscenoZ+fcNXakHxfn94V6nf1g==} cpu: [arm64] os: [linux] + libc: [glibc] '@oxlint/linux-arm64-musl@1.43.0': resolution: {integrity: sha512-BHV4fb36T2p/7bpA9fiJ5ayt7oJbiYX10nklW5arYp4l9/9yG/FQC5J4G1evzbJ/YbipF9UH0vYBAm5xbqGrvw==} cpu: [arm64] os: [linux] + libc: [musl] '@oxlint/linux-x64-gnu@1.43.0': resolution: {integrity: sha512-1l3nvnzWWse1YHibzZ4HQXdF/ibfbKZhp9IguElni3bBqEyPEyurzZ0ikWynDxKGXqZa+UNXTFuU1NRVX1RJ3g==} cpu: [x64] os: [linux] + libc: [glibc] '@oxlint/linux-x64-musl@1.43.0': resolution: {integrity: sha512-+jNYgLGRFTJxJuaSOZJBwlYo5M0TWRw0+3y5MHOL4ArrIdHyCthg6r4RbVWrsR1qUfUE1VSSHQ2bfbC99RXqMg==} cpu: [x64] os: [linux] + libc: [musl] '@oxlint/win32-arm64@1.43.0': resolution: {integrity: sha512-dvs1C/HCjCyGTURMagiHprsOvVTT3omDiSzi5Qw0D4QFJ1pEaNlfBhVnOUYgUfS6O7Mcmj4+G+sidRsQcWQ/kA==} @@ -1327,36 +1332,42 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm-musl@2.5.1': resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [musl] '@parcel/watcher-linux-arm64-glibc@2.5.1': resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.5.1': resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.5.1': resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.5.1': resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-win32-arm64@2.5.1': resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} @@ -1454,49 +1465,6 @@ packages: react: '>=18.0.0' react-dom: '>=18.0.0' - '@react-pdf/fns@3.1.2': - resolution: {integrity: sha512-qTKGUf0iAMGg2+OsUcp9ffKnKi41RukM/zYIWMDJ4hRVYSr89Q7e3wSDW/Koqx3ea3Uy/z3h2y3wPX6Bdfxk6g==} - - '@react-pdf/font@4.0.4': - resolution: {integrity: sha512-8YtgGtL511txIEc9AjiilpZ7yjid8uCd8OGUl6jaL3LIHnrToUupSN4IzsMQpVTCMYiDLFnDNQzpZsOYtRS/Pg==} - - '@react-pdf/image@3.0.4': - resolution: {integrity: sha512-z0ogVQE0bKqgXQ5smgzIU857rLV7bMgVdrYsu3UfXDDLSzI7QPvzf6MFTFllX6Dx2rcsF13E01dqKPtJEM799g==} - - '@react-pdf/layout@4.4.2': - resolution: {integrity: sha512-gNu2oh8MiGR+NJZYTJ4c4q0nWCESBI6rKFiodVhE7OeVAjtzZzd6l65wsN7HXdWJqOZD3ttD97iE+tf5SOd/Yg==} - - '@react-pdf/pdfkit@4.1.0': - resolution: {integrity: sha512-Wm/IOAv0h/U5Ra94c/PltFJGcpTUd/fwVMVeFD6X9tTTPCttIwg0teRG1Lqq617J8K4W7jpL/B0HTH0mjp3QpQ==} - - '@react-pdf/png-js@3.0.0': - resolution: {integrity: sha512-eSJnEItZ37WPt6Qv5pncQDxLJRK15eaRwPT+gZoujP548CodenOVp49GST8XJvKMFt9YqIBzGBV/j9AgrOQzVA==} - - '@react-pdf/primitives@4.1.1': - resolution: {integrity: sha512-IuhxYls1luJb7NUWy6q5avb1XrNaVj9bTNI40U9qGRuS6n7Hje/8H8Qi99Z9UKFV74bBP3DOf3L1wV2qZVgVrQ==} - - '@react-pdf/reconciler@2.0.0': - resolution: {integrity: sha512-7zaPRujpbHSmCpIrZ+b9HSTJHthcVZzX0Wx7RzvQGsGBUbHP4p6s5itXrAIOuQuPvDepoHGNOvf6xUuMVvdoyw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - - '@react-pdf/render@4.3.2': - resolution: {integrity: sha512-el5KYM1sH/PKcO4tRCIm8/AIEmhtraaONbwCrBhFdehoGv6JtgnXiMxHGAvZbI5kEg051GbyP+XIU6f6YbOu6Q==} - - '@react-pdf/renderer@4.3.2': - resolution: {integrity: sha512-EhPkj35gO9rXIyyx29W3j3axemvVY5RigMmlK4/6Ku0pXB8z9PEE/sz4ZBOShu2uot6V4xiCR3aG+t9IjJJlBQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - - '@react-pdf/stylesheet@6.1.2': - resolution: {integrity: sha512-E3ftGRYUQGKiN3JOgtGsLDo0hGekA6dmkmi/MYACytmPTKxQRBSO3126MebmCq+t1rgU9uRlREIEawJ+8nzSbw==} - - '@react-pdf/textkit@6.1.0': - resolution: {integrity: sha512-sFlzDC9CDFrJsnL3B/+NHrk9+Advqk7iJZIStiYQDdskbow8GF/AGYrpIk+vWSnh35YxaGbHkqXq53XOxnyrjQ==} - - '@react-pdf/types@2.9.2': - resolution: {integrity: sha512-dufvpKId9OajLLbgn9q7VLUmyo1Jf+iyGk2ZHmCL8nIDtL8N1Ejh9TH7+pXXrR0tdie1nmnEb5Bz9U7g4hI4/g==} - '@redux-devtools/extension@3.3.0': resolution: {integrity: sha512-X34S/rC8S/M1BIrkYD1mJ5f8vlH0BDqxXrs96cvxSBo4FhMdbhU+GUGsmNYov1xjSyLMHgo8NYrUG8bNX7525g==} peerDependencies: @@ -1548,56 +1516,67 @@ packages: resolution: {integrity: sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.54.0': resolution: {integrity: sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.54.0': resolution: {integrity: sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.54.0': resolution: {integrity: sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.54.0': resolution: {integrity: sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.54.0': resolution: {integrity: sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.54.0': resolution: {integrity: sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.54.0': resolution: {integrity: sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.54.0': resolution: {integrity: sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.54.0': resolution: {integrity: sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.54.0': resolution: {integrity: sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openharmony-arm64@4.54.0': resolution: {integrity: sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==} @@ -1749,9 +1728,6 @@ packages: '@speed-highlight/core@1.2.14': resolution: {integrity: sha512-G4ewlBNhUtlLvrJTb88d2mdy2KRijzs4UhnlrOSRT4bmjh/IqNElZa3zkrZ+TC47TwtlDWzVLFADljF1Ijp5hA==} - '@swc/helpers@0.5.18': - resolution: {integrity: sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ==} - '@tailwindcss/node@4.1.18': resolution: {integrity: sha512-DoR7U1P7iYhw16qJ49fgXUlry1t4CpXeErJHnQ44JgTSKMaZUdf17cfn5mHchfJ4KRBZRFA/Coo+MUF5+gOaCQ==} @@ -1873,30 +1849,35 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] '@tauri-apps/cli-linux-arm64-musl@2.10.0': resolution: {integrity: sha512-GUoPdVJmrJRIXFfW3Rkt+eGK9ygOdyISACZfC/bCSfOnGt8kNdQIQr5WRH9QUaTVFIwxMlQyV3m+yXYP+xhSVA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [musl] '@tauri-apps/cli-linux-riscv64-gnu@2.10.0': resolution: {integrity: sha512-JO7s3TlSxshwsoKNCDkyvsx5gw2QAs/Y2GbR5UE2d5kkU138ATKoPOtxn8G1fFT1aDW4LH0rYAAfBpGkDyJJnw==} engines: {node: '>= 10'} cpu: [riscv64] os: [linux] + libc: [glibc] '@tauri-apps/cli-linux-x64-gnu@2.10.0': resolution: {integrity: sha512-Uvh4SUUp4A6DVRSMWjelww0GnZI3PlVy7VS+DRF5napKuIehVjGl9XD0uKoCoxwAQBLctvipyEK+pDXpJeoHng==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] '@tauri-apps/cli-linux-x64-musl@2.10.0': resolution: {integrity: sha512-AP0KRK6bJuTpQ8kMNWvhIpKUkQJfcPFeba7QshOQZjJ8wOS6emwTN4K5g/d3AbCMo0RRdnZWwu67MlmtJyxC1Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] '@tauri-apps/cli-win32-arm64-msvc@2.10.0': resolution: {integrity: sha512-97DXVU3dJystrq7W41IX+82JEorLNY+3+ECYxvXWqkq7DBN6FsA08x/EFGE8N/b0LTOui9X2dvpGGoeZKKV08g==} @@ -2040,9 +2021,6 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0 - abs-svg-path@0.1.1: - resolution: {integrity: sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==} - acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -2138,10 +2116,6 @@ packages: base16@1.0.0: resolution: {integrity: sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==} - base64-js@0.0.8: - resolution: {integrity: sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==} - engines: {node: '>= 0.4'} - base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -2149,9 +2123,6 @@ packages: resolution: {integrity: sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==} hasBin: true - bidi-js@1.0.3: - resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} - binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -2176,12 +2147,6 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - brotli@1.3.3: - resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==} - - browserify-zlib@0.2.0: - resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} - browserslist@4.28.1: resolution: {integrity: sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -2285,10 +2250,6 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} - clone@2.1.2: - resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} - engines: {node: '>=0.8'} - clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} @@ -2373,9 +2334,6 @@ packages: crossws@0.3.5: resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} - crypto-js@4.2.0: - resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} - css-select@5.2.2: resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} @@ -2471,9 +2429,6 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dfa@1.2.0: - resolution: {integrity: sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==} - diff@8.0.3: resolution: {integrity: sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==} engines: {node: '>=0.3.1'} @@ -2512,9 +2467,6 @@ packages: electron-to-chromium@1.5.267: resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==} - emoji-regex-xs@1.0.0: - resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} - emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} @@ -2624,10 +2576,6 @@ packages: eventemitter3@5.0.4: resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} - events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - expand-template@2.0.3: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} @@ -2635,9 +2583,6 @@ packages: extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -2671,9 +2616,6 @@ packages: fontace@0.4.1: resolution: {integrity: sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw==} - fontkit@2.0.4: - resolution: {integrity: sha512-syetQadaUEDNdxdugga9CpEYVaQIxOwk7GlwZWWZ19//qW4zE5bknOKeMBDYAASwnpaSHKJITRLMF9m1fp3s6g==} - fontkitten@1.0.2: resolution: {integrity: sha512-piJxbLnkD9Xcyi7dWJRnqszEURixe7CrF/efBfbffe2DPyabmuIuqraruY8cXTs19QoM8VJzx47BDRVNXETM7Q==} engines: {node: '>=20'} @@ -2806,12 +2748,6 @@ packages: resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} engines: {node: '>=12.0.0'} - hsl-to-hex@1.0.0: - resolution: {integrity: sha512-K6GVpucS5wFf44X0h2bLVRDsycgJmf9FF2elg+CrqD8GcFU8c6vYhgXn8NjUkFCwj+xDFb70qgLbTUm6sxwPmA==} - - hsl-to-rgb-for-reals@1.1.1: - resolution: {integrity: sha512-LgOWAkrN0rFaQpfdWBQlv/VhkOxb5AsBjk6NQVx4yEzWS923T07X0M1Y0VNko2H52HeSpZrZNNMJ0aFqsdVzQg==} - html-escaper@3.0.3: resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} @@ -2825,9 +2761,6 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} - hyphen@1.13.0: - resolution: {integrity: sha512-flZoIooovWALhu04Z3ooPWQldjTOgLDs5DlbUxTjnIyhQKu9ukljKWwElFCUyVi6TBk210bMBlaMG8eW3bXU+g==} - ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -2927,9 +2860,6 @@ packages: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} - is-url@1.2.4: - resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==} - is-wsl@3.1.0: resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} engines: {node: '>=16'} @@ -2947,9 +2877,6 @@ packages: javascript-stringify@2.1.0: resolution: {integrity: sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==} - jay-peg@1.1.1: - resolution: {integrity: sha512-D62KEuBxz/ip2gQKOEhk/mx14o7eiFRaU+VNNSP4MOiIkwb/D6B3G1Mfas7C/Fit8EsSV2/IWjZElx/Gs6A4ww==} - jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3065,24 +2992,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.30.2: resolution: {integrity: sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.30.2: resolution: {integrity: sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.30.2: resolution: {integrity: sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.30.2: resolution: {integrity: sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==} @@ -3100,9 +3031,6 @@ packages: resolution: {integrity: sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==} engines: {node: '>= 12.0.0'} - linebreak@1.1.0: - resolution: {integrity: sha512-MHp03UImeVhB7XZtjd0E4n6+3xr5Dq/9xI/5FptGk5FrbDR3zagPa2DS6U8ks/3HjbKWG9Q1M2ufOzxV2qLYSQ==} - lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -3233,9 +3161,6 @@ packages: mdn-data@2.12.2: resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} - media-engine@1.0.3: - resolution: {integrity: sha512-aa5tG6sDoK+k70B9iEX1NeyfT8ObCKhNDs6lJVpwF6r8vhUfuKMslIcirq6HIUYuuUYLefcEQOn9bSBOvawtwg==} - merge-refs@1.3.0: resolution: {integrity: sha512-nqXPXbso+1dcKDpPCXvwZyJILz+vSLqGGOnDrYHQYE+B8n9JTCekVLC65AfCpR4ggVyA/45Y0iR9LDyS2iI+zA==} peerDependencies: @@ -3451,16 +3376,9 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - normalize-svg-path@1.1.0: - resolution: {integrity: sha512-r9KHKG2UUeB5LoTouwDzBy2VxXlHsiM6fyLQvnJa0S5hrhzqElH/CH7TUGhT1fVvIYBIKf3OpY4YJ4CK+iaqHg==} - nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - observable-fns@0.6.1: resolution: {integrity: sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg==} @@ -3528,12 +3446,6 @@ packages: package-manager-detector@1.6.0: resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==} - pako@0.2.9: - resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} - - pako@1.0.11: - resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} - parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -3548,9 +3460,6 @@ packages: parse-latin@7.0.0: resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==} - parse-svg-path@0.1.2: - resolution: {integrity: sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==} - parse5@7.3.0: resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} @@ -3615,9 +3524,6 @@ packages: resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} engines: {node: '>=4'} - postcss-value-parser@4.2.0: - resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.5.6: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} @@ -3643,9 +3549,6 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} - prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - property-information@7.1.0: resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==} @@ -3660,9 +3563,6 @@ packages: pump@3.0.3: resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==} - queue@6.0.2: - resolution: {integrity: sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==} - radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} @@ -3911,9 +3811,6 @@ packages: peerDependencies: react: '>=16.13.1' - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} @@ -4079,10 +3976,6 @@ packages: remark-stringify@11.0.0: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - resize-observer-polyfill@1.5.1: resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==} @@ -4102,9 +3995,6 @@ packages: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} - restructure@3.0.2: - resolution: {integrity: sha512-gSfoiOEA0VPE6Tukkrr7I0RBdE0s7H1eFCDBk05l1KIQT1UIKNc5JZy6jdyW6eYH3aR3g5b3PuL77rq0hvwtAw==} - retext-latin@4.0.0: resolution: {integrity: sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA==} @@ -4137,9 +4027,6 @@ packages: scheduler@0.23.2: resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} - scheduler@0.25.0-rc-603e6108-20241029: - resolution: {integrity: sha512-pFwF6H1XrSdYYNLfOcGlM28/j8CGLu8IvdrxqhjWULe2bPcKiKW4CV+OWqR/9fT52mywx65l7ysNkjLKBda7eA==} - scroll-into-view-if-needed@3.1.0: resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==} @@ -4271,9 +4158,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svg-arc-to-cubic-bezier@3.2.0: - resolution: {integrity: sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g==} - svgo@4.0.0: resolution: {integrity: sha512-VvrHQ+9uniE+Mvx3+C9IEe/lWasXCU0nXMY2kZeLrHNICuRiC8uMPyM14UEaMOFA5mhyQqEkB02VoQ16n3DLaw==} engines: {node: '>=16'} @@ -4389,12 +4273,6 @@ packages: unenv@2.0.0-rc.24: resolution: {integrity: sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==} - unicode-properties@1.4.1: - resolution: {integrity: sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==} - - unicode-trie@2.0.0: - resolution: {integrity: sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==} - unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -4567,10 +4445,6 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite-compatible-readable-stream@3.6.1: - resolution: {integrity: sha512-t20zYkrSf868+j/p31cRIGN28Phrjm3nRSLR2fyc2tiWi4cZGVdv68yNlwnIINTkMTmPoMiSlc0OadaO7DXZaQ==} - engines: {node: '>= 6'} - vite@6.4.1: resolution: {integrity: sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -4726,9 +4600,6 @@ packages: resolution: {integrity: sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==} engines: {node: '>=18'} - yoga-layout@3.2.1: - resolution: {integrity: sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==} - youch-core@0.3.3: resolution: {integrity: sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==} @@ -5862,107 +5733,6 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-is: 18.3.1 - '@react-pdf/fns@3.1.2': {} - - '@react-pdf/font@4.0.4': - dependencies: - '@react-pdf/pdfkit': 4.1.0 - '@react-pdf/types': 2.9.2 - fontkit: 2.0.4 - is-url: 1.2.4 - - '@react-pdf/image@3.0.4': - dependencies: - '@react-pdf/png-js': 3.0.0 - jay-peg: 1.1.1 - - '@react-pdf/layout@4.4.2': - dependencies: - '@react-pdf/fns': 3.1.2 - '@react-pdf/image': 3.0.4 - '@react-pdf/primitives': 4.1.1 - '@react-pdf/stylesheet': 6.1.2 - '@react-pdf/textkit': 6.1.0 - '@react-pdf/types': 2.9.2 - emoji-regex-xs: 1.0.0 - queue: 6.0.2 - yoga-layout: 3.2.1 - - '@react-pdf/pdfkit@4.1.0': - dependencies: - '@babel/runtime': 7.28.4 - '@react-pdf/png-js': 3.0.0 - browserify-zlib: 0.2.0 - crypto-js: 4.2.0 - fontkit: 2.0.4 - jay-peg: 1.1.1 - linebreak: 1.1.0 - vite-compatible-readable-stream: 3.6.1 - - '@react-pdf/png-js@3.0.0': - dependencies: - browserify-zlib: 0.2.0 - - '@react-pdf/primitives@4.1.1': {} - - '@react-pdf/reconciler@2.0.0(react@18.3.1)': - dependencies: - object-assign: 4.1.1 - react: 18.3.1 - scheduler: 0.25.0-rc-603e6108-20241029 - - '@react-pdf/render@4.3.2': - dependencies: - '@babel/runtime': 7.28.4 - '@react-pdf/fns': 3.1.2 - '@react-pdf/primitives': 4.1.1 - '@react-pdf/textkit': 6.1.0 - '@react-pdf/types': 2.9.2 - abs-svg-path: 0.1.1 - color-string: 1.9.1 - normalize-svg-path: 1.1.0 - parse-svg-path: 0.1.2 - svg-arc-to-cubic-bezier: 3.2.0 - - '@react-pdf/renderer@4.3.2(react@18.3.1)': - dependencies: - '@babel/runtime': 7.28.4 - '@react-pdf/fns': 3.1.2 - '@react-pdf/font': 4.0.4 - '@react-pdf/layout': 4.4.2 - '@react-pdf/pdfkit': 4.1.0 - '@react-pdf/primitives': 4.1.1 - '@react-pdf/reconciler': 2.0.0(react@18.3.1) - '@react-pdf/render': 4.3.2 - '@react-pdf/types': 2.9.2 - events: 3.3.0 - object-assign: 4.1.1 - prop-types: 15.8.1 - queue: 6.0.2 - react: 18.3.1 - - '@react-pdf/stylesheet@6.1.2': - dependencies: - '@react-pdf/fns': 3.1.2 - '@react-pdf/types': 2.9.2 - color-string: 1.9.1 - hsl-to-hex: 1.0.0 - media-engine: 1.0.3 - postcss-value-parser: 4.2.0 - - '@react-pdf/textkit@6.1.0': - dependencies: - '@react-pdf/fns': 3.1.2 - bidi-js: 1.0.3 - hyphen: 1.13.0 - unicode-properties: 1.4.1 - - '@react-pdf/types@2.9.2': - dependencies: - '@react-pdf/font': 4.0.4 - '@react-pdf/primitives': 4.1.1 - '@react-pdf/stylesheet': 6.1.2 - '@redux-devtools/extension@3.3.0(redux@5.0.1)': dependencies: '@babel/runtime': 7.28.4 @@ -6186,10 +5956,6 @@ snapshots: '@speed-highlight/core@1.2.14': {} - '@swc/helpers@0.5.18': - dependencies: - tslib: 2.8.1 - '@tailwindcss/node@4.1.18': dependencies: '@jridgewell/remapping': 2.3.5 @@ -6450,8 +6216,6 @@ snapshots: transitivePeerDependencies: - supports-color - abs-svg-path@0.1.1: {} - acorn-jsx@5.3.2(acorn@8.15.0): dependencies: acorn: 8.15.0 @@ -6681,16 +6445,10 @@ snapshots: base16@1.0.0: {} - base64-js@0.0.8: {} - base64-js@1.5.1: {} baseline-browser-mapping@2.9.11: {} - bidi-js@1.0.3: - dependencies: - require-from-string: 2.0.2 - binary-extensions@2.3.0: {} bl@4.1.0: @@ -6722,14 +6480,6 @@ snapshots: dependencies: fill-range: 7.1.1 - brotli@1.3.3: - dependencies: - base64-js: 1.5.1 - - browserify-zlib@0.2.0: - dependencies: - pako: 1.0.11 - browserslist@4.28.1: dependencies: baseline-browser-mapping: 2.9.11 @@ -6834,8 +6584,6 @@ snapshots: clone@1.0.4: {} - clone@2.1.2: {} - clsx@2.1.1: {} collapse-white-space@2.1.0: {} @@ -6915,8 +6663,6 @@ snapshots: dependencies: uncrypto: 0.1.3 - crypto-js@4.2.0: {} - css-select@5.2.2: dependencies: boolbase: 1.0.0 @@ -6996,8 +6742,6 @@ snapshots: dependencies: dequal: 2.0.3 - dfa@1.2.0: {} - diff@8.0.3: {} dlv@1.1.3: {} @@ -7034,8 +6778,6 @@ snapshots: electron-to-chromium@1.5.267: {} - emoji-regex-xs@1.0.0: {} - emoji-regex@10.6.0: {} emoji-regex@8.0.0: {} @@ -7224,15 +6966,11 @@ snapshots: eventemitter3@5.0.4: {} - events@3.3.0: {} - expand-template@2.0.3: optional: true extend@3.0.2: {} - fast-deep-equal@3.1.3: {} - fdir@6.5.0(picomatch@4.0.3): optionalDependencies: picomatch: 4.0.3 @@ -7254,18 +6992,6 @@ snapshots: dependencies: fontkitten: 1.0.2 - fontkit@2.0.4: - dependencies: - '@swc/helpers': 0.5.18 - brotli: 1.3.3 - clone: 2.1.2 - dfa: 1.2.0 - fast-deep-equal: 3.1.3 - restructure: 3.0.2 - tiny-inflate: 1.0.3 - unicode-properties: 1.4.1 - unicode-trie: 2.0.0 - fontkitten@1.0.2: dependencies: tiny-inflate: 1.0.3 @@ -7504,12 +7230,6 @@ snapshots: highlight.js@11.11.1: {} - hsl-to-hex@1.0.0: - dependencies: - hsl-to-rgb-for-reals: 1.1.1 - - hsl-to-rgb-for-reals@1.1.1: {} - html-escaper@3.0.3: {} html-void-elements@3.0.0: {} @@ -7523,8 +7243,6 @@ snapshots: transitivePeerDependencies: - supports-color - hyphen@1.13.0: {} - ieee754@1.2.1: {} immutable@4.3.7: {} @@ -7596,8 +7314,6 @@ snapshots: is-unicode-supported@0.1.0: {} - is-url@1.2.4: {} - is-wsl@3.1.0: dependencies: is-inside-container: 1.0.0 @@ -7616,10 +7332,6 @@ snapshots: javascript-stringify@2.1.0: {} - jay-peg@1.1.1: - dependencies: - restructure: 3.0.2 - jest-get-type@29.6.3: {} jest-validate@29.7.0: @@ -7737,11 +7449,6 @@ snapshots: lightningcss-win32-arm64-msvc: 1.30.2 lightningcss-win32-x64-msvc: 1.30.2 - linebreak@1.1.0: - dependencies: - base64-js: 0.0.8 - unicode-trie: 2.0.0 - lines-and-columns@1.2.4: {} locate-path@6.0.0: @@ -7974,8 +7681,6 @@ snapshots: mdn-data@2.12.2: {} - media-engine@1.0.3: {} - merge-refs@1.3.0(@types/react@18.3.23): optionalDependencies: '@types/react': 18.3.23 @@ -8327,16 +8032,10 @@ snapshots: normalize-path@3.0.0: {} - normalize-svg-path@1.1.0: - dependencies: - svg-arc-to-cubic-bezier: 3.2.0 - nth-check@2.1.1: dependencies: boolbase: 1.0.0 - object-assign@4.1.1: {} - observable-fns@0.6.1: {} ofetch@1.5.1: @@ -8423,10 +8122,6 @@ snapshots: package-manager-detector@1.6.0: {} - pako@0.2.9: {} - - pako@1.0.11: {} - parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -8457,8 +8152,6 @@ snapshots: unist-util-visit-children: 3.0.0 vfile: 6.0.3 - parse-svg-path@0.1.2: {} - parse5@7.3.0: dependencies: entities: 6.0.1 @@ -8510,8 +8203,6 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-value-parser@4.2.0: {} - postcss@8.5.6: dependencies: nanoid: 3.3.11 @@ -8549,12 +8240,6 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 - prop-types@15.8.1: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - property-information@7.1.0: {} proxy-from-env@1.1.0: {} @@ -8569,10 +8254,6 @@ snapshots: once: 1.4.0 optional: true - queue@6.0.2: - dependencies: - inherits: 2.0.4 - radix3@1.1.2: {} rc-cascader@3.34.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -8924,8 +8605,6 @@ snapshots: '@babel/runtime': 7.28.4 react: 18.3.1 - react-is@16.13.1: {} - react-is@18.3.1: {} react-json-tree@0.18.0(@types/react@18.3.23)(react@18.3.1): @@ -9151,8 +8830,6 @@ snapshots: mdast-util-to-markdown: 2.1.2 unified: 11.0.5 - require-from-string@2.0.2: {} - resize-observer-polyfill@1.5.1: {} resolve-from@4.0.0: {} @@ -9170,8 +8847,6 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - restructure@3.0.2: {} - retext-latin@4.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -9241,8 +8916,6 @@ snapshots: dependencies: loose-envify: 1.4.0 - scheduler@0.25.0-rc-603e6108-20241029: {} - scroll-into-view-if-needed@3.1.0: dependencies: compute-scroll-into-view: 3.1.1 @@ -9399,8 +9072,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svg-arc-to-cubic-bezier@3.2.0: {} - svgo@4.0.0: dependencies: commander: 11.1.0 @@ -9513,16 +9184,6 @@ snapshots: dependencies: pathe: 2.0.3 - unicode-properties@1.4.1: - dependencies: - base64-js: 1.5.1 - unicode-trie: 2.0.0 - - unicode-trie@2.0.0: - dependencies: - pako: 0.2.9 - tiny-inflate: 1.0.3 - unified@11.0.5: dependencies: '@types/unist': 3.0.3 @@ -9665,12 +9326,6 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite-compatible-readable-stream@3.6.1: - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - vite@6.4.1(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2)(sass@1.97.3)(tsx@4.21.0): dependencies: esbuild: 0.25.12 @@ -9787,8 +9442,6 @@ snapshots: yoctocolors@2.1.2: {} - yoga-layout@3.2.1: {} - youch-core@0.3.3: dependencies: '@poppinss/exception': 1.2.3 diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 71f988c..57a1960 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -210,6 +210,24 @@ version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ar_archive_writer" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" +dependencies = [ + "object", +] + [[package]] name = "arbitrary" version = "1.4.2" @@ -219,6 +237,18 @@ dependencies = [ "derive_arbitrary", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + [[package]] name = "async-broadcast" version = "0.7.2" @@ -394,6 +424,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "az" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be5eb007b7cacc6c660343e96f650fedf4b5a77512399eb952ca6642cf8d13f7" + [[package]] name = "backtrace" version = "0.3.76" @@ -427,6 +463,44 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +[[package]] +name = "biblatex" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d0c374feba1b9a59042a7c1cf00ce7c34b977b9134fe7c42b08e5183729f66" +dependencies = [ + "paste", + "roman-numerals-rs", + "strum", + "unic-langid", + "unicode-normalization", + "unscanny", +] + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bitflags" version = "1.3.2" @@ -500,11 +574,31 @@ version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + [[package]] name = "bytemuck" version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] [[package]] name = "byteorder" @@ -512,6 +606,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + [[package]] name = "bytes" version = "1.11.1" @@ -646,6 +746,24 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chinese-number" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e964125508474a83c95eb935697abbeb446ff4e9d62c71ce880e3986d1c606b" +dependencies = [ + "chinese-variant", + "enum-ordinalize", + "num-bigint", + "num-traits", +] + +[[package]] +name = "chinese-variant" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58b52a9840ffff5d4d0058ae529fa066a75e794e3125546acfc61c23ad755e49" + [[package]] name = "chrono" version = "0.4.43" @@ -660,6 +778,64 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "citationberg" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f6597e8bdbca37f1f56e5a80d15857b0932aead21a78d20de49e99e74933046" +dependencies = [ + "quick-xml", + "serde", +] + +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror 2.0.18", +] + +[[package]] +name = "codex" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9589e1effc5cacbea347899645c654158b03b2053d24bb426fd3128ced6e423c" + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + [[package]] name = "combine" version = "4.6.7" @@ -670,6 +846,30 @@ dependencies = [ "memchr", ] +[[package]] +name = "comemo" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c963350b2b08aa4b725d7802593245380ab53dacfedcaa971385fc33306c0d4" +dependencies = [ + "comemo-macros", + "parking_lot", + "rustc-hash", + "siphasher 1.0.2", + "slab", +] + +[[package]] +name = "comemo-macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c400139ba1389ef9e20ad2d87cda68b437a66483aa0da616bdf2cea7413853" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -797,6 +997,15 @@ dependencies = [ "libc", ] +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -839,6 +1048,25 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-queue" version = "0.3.12" @@ -854,6 +1082,12 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + [[package]] name = "crypto-common" version = "0.1.7" @@ -891,6 +1125,27 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "csv" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde_core", +] + +[[package]] +name = "csv-core" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" +dependencies = [ + "memchr", +] + [[package]] name = "ctor" version = "0.2.9" @@ -1156,6 +1411,15 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "ecow" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78e4f79b296fbaab6ce2e22d52cb4c7f010fe0ebe7a32e34fa25885fd797bd02" +dependencies = [ + "serde", +] + [[package]] name = "either" version = "1.15.0" @@ -1185,6 +1449,18 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -1200,6 +1476,26 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" +[[package]] +name = "enum-ordinalize" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "enumflags2" version = "0.7.12" @@ -1259,6 +1555,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + [[package]] name = "event-listener" version = "5.4.1" @@ -1280,6 +1585,23 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fancy-regex" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "998b056554fbe42e03ae0e152895cd1a7e1002aec800fdc6635d20270260c46f" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "fast-srgb8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" + [[package]] name = "fastrand" version = "2.3.0" @@ -1342,6 +1664,22 @@ checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", + "zlib-rs", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + +[[package]] +name = "float-cmp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" +dependencies = [ + "num-traits", ] [[package]] @@ -1367,6 +1705,38 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "font-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "fontconfig-parser" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbc773e24e02d4ddd8395fd30dc147524273a83e54e0f312d986ea30de5f5646" +dependencies = [ + "roxmltree", +] + +[[package]] +name = "fontdb" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser", +] + [[package]] name = "foreign-types" version = "0.3.2" @@ -1682,14 +2052,34 @@ dependencies = [ ] [[package]] -name = "gimli" -version = "0.32.3" +name = "gif" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" +checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" +dependencies = [ + "color_quant", + "weezl", +] [[package]] -name = "gio" -version = "0.18.4" +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "gio" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ @@ -1766,6 +2156,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "glidesort" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2e102e6eb644d3e0b186fc161e4460417880a0a0b87d235f2e5b8fb30f2e9e0" + [[package]] name = "glob" version = "0.3.3" @@ -1854,6 +2250,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -1886,6 +2293,109 @@ dependencies = [ "hashbrown 0.15.5", ] +[[package]] +name = "hayagriva" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cb69425736f184173b3ca6e27fcba440a61492a790c786b1c6af7e06a03e575" +dependencies = [ + "biblatex", + "ciborium", + "citationberg", + "indexmap 2.13.0", + "paste", + "roman-numerals-rs", + "serde", + "serde_yaml", + "thiserror 2.0.18", + "unic-langid", + "unicode-segmentation", + "unscanny", + "url", +] + +[[package]] +name = "hayro" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "048488ba88552bb0fb2a7e4001c64d5bed65d1a92167186a1bb9151571f32e60" +dependencies = [ + "bytemuck", + "hayro-interpret", + "image", + "kurbo 0.12.0", +] + +[[package]] +name = "hayro-font" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10e7e97ce840a6a70e7901e240ec65ba61106b66b37a4a1b899a2ce484248463" +dependencies = [ + "log", + "phf 0.13.1", +] + +[[package]] +name = "hayro-interpret" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56204c972d08e844f3db13b1e14be769f846e576699b46d4f4637cc4f8f70102" +dependencies = [ + "bitflags 2.10.0", + "hayro-font", + "hayro-syntax", + "kurbo 0.12.0", + "log", + "moxcms 0.7.11", + "phf 0.13.1", + "rustc-hash", + "siphasher 1.0.2", + "skrifa", + "smallvec", + "yoke 0.8.1", +] + +[[package]] +name = "hayro-svg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c673304cec6e0dfd3b4f71fccecd45646899aa70279b62d3f933842abc4ac5" +dependencies = [ + "base64 0.22.1", + "hayro-interpret", + "image", + "kurbo 0.12.0", + "siphasher 1.0.2", + "xmlwriter", +] + +[[package]] +name = "hayro-syntax" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9e5c7dbc0f11dc42775d1a6cc00f5f5137b90b6288dd7fe5f71d17b14d10be" +dependencies = [ + "flate2", + "kurbo 0.12.0", + "log", + "rustc-hash", + "smallvec", + "zune-jpeg 0.4.21", +] + +[[package]] +name = "hayro-write" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc05d8b4bc878b9aee48d980ecb25ed08f1dd9fad6da5ab4d9b7c56ec03a0cf6" +dependencies = [ + "flate2", + "hayro-syntax", + "log", + "pdf-writer", +] + [[package]] name = "heck" version = "0.4.1" @@ -2096,6 +2606,12 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "hypher" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef68590049bab63a464eee1a1158ac04c6f6613a546d8d90f78636b8b94f171" + [[package]] name = "iana-time-zone" version = "0.1.65" @@ -2127,7 +2643,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" dependencies = [ "byteorder", - "png", + "png 0.17.16", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "serde", + "yoke 0.7.5", + "zerofrom", + "zerovec 0.10.4", ] [[package]] @@ -2138,9 +2667,9 @@ checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", - "yoke", + "yoke 0.8.1", "zerofrom", - "zerovec", + "zerovec 0.11.5", ] [[package]] @@ -2150,24 +2679,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", + "litemap 0.8.1", + "tinystr 0.8.2", + "writeable 0.6.2", + "zerovec 0.11.5", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap 0.7.5", + "tinystr 0.7.6", + "writeable 0.5.5", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider 1.5.0", + "tinystr 0.7.6", + "zerovec 0.10.4", ] +[[package]] +name = "icu_locid_transform_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" + [[package]] name = "icu_normalizer" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "icu_collections", + "icu_collections 2.1.1", "icu_normalizer_data", - "icu_properties", - "icu_provider", + "icu_properties 2.1.2", + "icu_provider 2.1.1", "smallvec", - "zerovec", + "zerovec 0.11.5", ] [[package]] @@ -2176,26 +2738,67 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections 1.5.0", + "icu_locid_transform", + "icu_properties_data 1.5.1", + "icu_provider 1.5.0", + "serde", + "tinystr 0.7.6", + "zerovec 0.10.4", +] + [[package]] name = "icu_properties" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ - "icu_collections", + "icu_collections 2.1.1", "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", + "icu_properties_data 2.1.2", + "icu_provider 2.1.1", + "zerotrie 0.2.3", + "zerovec 0.11.5", ] +[[package]] +name = "icu_properties_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" + [[package]] name = "icu_properties_data" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "postcard", + "serde", + "stable_deref_trait", + "tinystr 0.7.6", + "writeable 0.5.5", + "yoke 0.7.5", + "zerofrom", + "zerovec 0.10.4", +] + [[package]] name = "icu_provider" version = "2.1.1" @@ -2204,13 +2807,74 @@ checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", - "writeable", - "yoke", + "writeable 0.6.2", + "yoke 0.8.1", "zerofrom", - "zerotrie", - "zerovec", + "zerotrie 0.2.3", + "zerovec 0.11.5", ] +[[package]] +name = "icu_provider_adapters" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6324dfd08348a8e0374a447ebd334044d766b1839bb8d5ccf2482a99a77c0bc" +dependencies = [ + "icu_locid", + "icu_locid_transform", + "icu_provider 1.5.0", + "tinystr 0.7.6", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_provider_blob" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c24b98d1365f55d78186c205817631a4acf08d7a45bdf5dc9dcf9c5d54dccf51" +dependencies = [ + "icu_provider 1.5.0", + "postcard", + "serde", + "writeable 0.5.5", + "zerotrie 0.1.3", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "icu_segmenter" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a717725612346ffc2d7b42c94b820db6908048f39434504cb130e8b46256b0de" +dependencies = [ + "core_maths", + "displaydoc", + "icu_collections 1.5.0", + "icu_locid", + "icu_provider 1.5.0", + "icu_segmenter_data", + "serde", + "utf8_iter", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_segmenter_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e52775179941363cc594e49ce99284d13d6948928d8e72c755f55e98caa1eb" + [[package]] name = "ident_case" version = "1.0.1" @@ -2235,9 +2899,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", - "icu_properties", + "icu_properties 2.1.2", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "gif 0.14.2", + "image-webp", + "moxcms 0.8.1", + "num-traits", + "png 0.18.1", + "zune-core 0.5.1", + "zune-jpeg 0.5.15", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", ] +[[package]] +name = "imagesize" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" + +[[package]] +name = "imagesize" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e54e57b4c48b40f7aec75635392b12b3421fa26fe8b4332e63138ed278459c" + [[package]] name = "impl-more" version = "0.1.9" @@ -2394,6 +3098,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "kamadak-exif" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837" +dependencies = [ + "mutate_once", +] + [[package]] name = "keyboard-types" version = "0.7.0" @@ -2405,6 +3118,53 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "krilla" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ddfec86fec13d068075e14f22a7e217c281f3ed69ddcb427bf3f5d504fd674" +dependencies = [ + "base64 0.22.1", + "bumpalo", + "comemo", + "flate2", + "float-cmp 0.10.0", + "gif 0.13.3", + "hayro-write", + "image-webp", + "imagesize 0.14.0", + "indexmap 2.13.0", + "once_cell", + "pdf-writer", + "png 0.17.16", + "rayon", + "rustc-hash", + "rustybuzz", + "siphasher 1.0.2", + "skrifa", + "smallvec", + "subsetter", + "tiny-skia-path", + "xmp-writer", + "yoke 0.8.1", + "zune-jpeg 0.5.15", +] + +[[package]] +name = "krilla-svg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f485e1a850201a01dcd8d73e7cf09f2cd4c4cc85c2cd296359094d49336d8ef7" +dependencies = [ + "flate2", + "fontdb", + "krilla", + "png 0.17.16", + "resvg", + "tiny-skia", + "usvg", +] + [[package]] name = "kuchikiki" version = "0.8.8-speedreader" @@ -2417,6 +3177,28 @@ dependencies = [ "selectors", ] +[[package]] +name = "kurbo" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62026ae44756f8a599ba21140f350303d4f08dcdcc71b5ad9c9bb8128c13c62" +dependencies = [ + "arrayvec", + "euclid", + "smallvec", +] + +[[package]] +name = "kurbo" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce9729cc38c18d86123ab736fd2e7151763ba226ac2490ec092d1dd148825e32" +dependencies = [ + "arrayvec", + "euclid", + "smallvec", +] + [[package]] name = "language-tags" version = "0.3.2" @@ -2500,12 +3282,37 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +[[package]] +name = "lipsum" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "636860251af8963cc40f6b4baadee105f02e21b28131d76eba8e40ce84ab8064" +dependencies = [ + "rand 0.8.5", + "rand_chacha 0.3.1", +] + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +dependencies = [ + "serde", +] + [[package]] name = "litemap" version = "0.8.1" @@ -2598,6 +3405,15 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +[[package]] +name = "memmap2" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.9.1" @@ -2641,6 +3457,26 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "moxcms" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + [[package]] name = "muda" version = "0.17.1" @@ -2656,12 +3492,18 @@ dependencies = [ "objc2-core-foundation", "objc2-foundation", "once_cell", - "png", + "png 0.17.16", "serde", "thiserror 2.0.18", "windows-sys 0.60.2", ] +[[package]] +name = "mutate_once" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" + [[package]] name = "nanoid" version = "0.4.0" @@ -2742,6 +3584,16 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint-dig" version = "0.8.6" @@ -3192,6 +4044,30 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "palette" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" +dependencies = [ + "approx", + "fast-srgb8", + "libm", + "palette_derive", +] + +[[package]] +name = "palette_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" +dependencies = [ + "by_address", + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "pango" version = "0.18.3" @@ -3246,12 +4122,30 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pathdiff" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" +[[package]] +name = "pdf-writer" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92a79477295a713c2ed425aa82a8b5d20cec3fdee203706cbe6f3854880c1c81" +dependencies = [ + "bitflags 2.10.0", + "itoa", + "memchr", + "ryu", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -3297,6 +4191,17 @@ dependencies = [ "phf_shared 0.11.3", ] +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", +] + [[package]] name = "phf_codegen" version = "0.8.0" @@ -3347,6 +4252,16 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + [[package]] name = "phf_macros" version = "0.10.0" @@ -3374,6 +4289,19 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "phf_shared" version = "0.8.0" @@ -3401,6 +4329,21 @@ dependencies = [ "siphasher 1.0.2", ] +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher 1.0.2", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project-lite" version = "0.2.16" @@ -3477,6 +4420,19 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.10.0", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + [[package]] name = "polling" version = "3.11.0" @@ -3491,13 +4447,31 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "postcard" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "serde", +] + [[package]] name = "potential_utf" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ - "zerovec", + "zerovec 0.11.5", ] [[package]] @@ -3595,6 +4569,16 @@ version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" +[[package]] +name = "psm" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea" +dependencies = [ + "ar_archive_writer", + "cc", +] + [[package]] name = "publicsuffix" version = "2.3.0" @@ -3605,6 +4589,24 @@ dependencies = [ "psl-types", ] +[[package]] +name = "pxfm" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" + +[[package]] +name = "qcms" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edecfcd5d755a5e5d98e24cf43113e7cdaec5a070edd0f6b250c03a573da30fa" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quick-xml" version = "0.38.4" @@ -3612,6 +4614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" dependencies = [ "memchr", + "serde", ] [[package]] @@ -3800,6 +4803,36 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "read-fonts" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358" +dependencies = [ + "bytemuck", + "font-types", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -3971,6 +5004,23 @@ dependencies = [ "web-sys", ] +[[package]] +name = "resvg" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" +dependencies = [ + "gif 0.13.3", + "image-webp", + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia", + "usvg", + "zune-jpeg 0.4.21", +] + [[package]] name = "rfd" version = "0.16.0" @@ -3995,6 +5045,15 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "rgb" +version = "0.8.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" +dependencies = [ + "bytemuck", +] + [[package]] name = "ring" version = "0.17.14" @@ -4009,6 +5068,18 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "roman-numerals-rs" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85cd47a33a4510b1424fe796498e174c6a9cf94e606460ef022a19f3e4ff85e" + +[[package]] +name = "roxmltree" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" + [[package]] name = "rsa" version = "0.9.10" @@ -4029,6 +5100,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rust_decimal" +version = "1.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c5108e3d4d903e21aac27f12ba5377b6b34f9f44b325e4894c7924169d06995" +dependencies = [ + "arrayvec", + "num-traits", +] + [[package]] name = "rustc-demangle" version = "0.1.27" @@ -4143,6 +5224,24 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +[[package]] +name = "rustybuzz" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" +dependencies = [ + "bitflags 2.10.0", + "bytemuck", + "core_maths", + "log", + "smallvec", + "ttf-parser", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-properties", + "unicode-script", +] + [[package]] name = "ryu" version = "1.0.22" @@ -4560,6 +5659,19 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.13.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serialize-to-javascript" version = "0.1.2" @@ -4646,6 +5758,15 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +[[package]] +name = "simplecss" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" +dependencies = [ + "log", +] + [[package]] name = "siphasher" version = "0.3.11" @@ -4656,7 +5777,17 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" name = "siphasher" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" + +[[package]] +name = "skrifa" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841" +dependencies = [ + "bytemuck", + "read-fonts", +] [[package]] name = "slab" @@ -4664,6 +5795,15 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.15.1" @@ -4955,6 +6095,28 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "stacker" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "640c8cdd92b6b12f5bcb1803ca3bbf5ab96e5e6b6b96b9ab77dabe9e880b3190" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.61.2", +] + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp 0.9.0", +] + [[package]] name = "string_cache" version = "0.8.9" @@ -4997,12 +6159,55 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "subsetter" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6895a12ac5599bb6057362f00e8a3cf1daab4df33f553a55690a44e4fed8d0" +dependencies = [ + "kurbo 0.12.0", + "rustc-hash", + "skrifa", + "write-fonts", +] + [[package]] name = "subtle" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "svgtypes" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" +dependencies = [ + "kurbo 0.11.3", + "siphasher 1.0.2", +] + [[package]] name = "swift-rs" version = "1.0.7" @@ -5056,6 +6261,27 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "syntect" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "656b45c05d95a5704399aeef6bd0ddec7b2b3531b7c9e900abbf7c4d2190c925" +dependencies = [ + "bincode", + "fancy-regex", + "flate2", + "fnv", + "once_cell", + "plist", + "regex-syntax", + "serde", + "serde_derive", + "serde_json", + "thiserror 2.0.18", + "walkdir", + "yaml-rust", +] + [[package]] name = "system-configuration" version = "0.7.0" @@ -5243,7 +6469,7 @@ dependencies = [ "ico", "json-patch", "plist", - "png", + "png 0.17.16", "proc-macro2", "quote", "semver", @@ -5544,6 +6770,12 @@ dependencies = [ "utf-8", ] +[[package]] +name = "thin-vec" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0f7e269b48f0a7dd0146680fa24b50cc67fc0373f086a5b2f99bd084639b482" + [[package]] name = "thiserror" version = "1.0.69" @@ -5615,6 +6847,43 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "png 0.17.16", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "serde", + "zerovec 0.10.4", +] + [[package]] name = "tinystr" version = "0.8.2" @@ -5622,7 +6891,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", - "zerovec", + "serde_core", + "zerovec 0.11.5", ] [[package]] @@ -5877,63 +7147,397 @@ dependencies = [ ] [[package]] -name = "tracing-core" -version = "0.1.36" +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +dependencies = [ + "tracing-core", +] + +[[package]] +name = "tray-icon" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e85aa143ceb072062fc4d6356c1b520a51d636e7bc8e77ec94be3608e5e80c" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png 0.17.16", + "serde", + "thiserror 2.0.18", + "windows-sys 0.60.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +dependencies = [ + "core_maths", +] + +[[package]] +name = "two-face" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e51b6e60e545cfdae5a4639ff423818f52372211a8d9a3e892b4b0761f76b2" +dependencies = [ + "serde", + "serde_derive", + "syntect", +] + +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "typst" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f6511ee598476f4f322b4d13891083d96dbacb8f9c2b908604c7094ba390653" +dependencies = [ + "comemo", + "ecow", + "rustc-hash", + "typst-eval", + "typst-html", + "typst-layout", + "typst-library", + "typst-macros", + "typst-realize", + "typst-syntax", + "typst-timing", + "typst-utils", +] + +[[package]] +name = "typst-as-lib" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d1310816d33fa3582dbb60bf0e5272af44d955a5fa13b148ddea62005088df" +dependencies = [ + "chrono", + "comemo", + "dirs", + "ecow", + "thiserror 2.0.18", + "typst", +] + +[[package]] +name = "typst-assets" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5613cb719a6222fe9b74027c3625d107767ec187bff26b8fc931cf58942c834f" + +[[package]] +name = "typst-eval" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687757487dfc0c1e941344d5024cf7a28364e70c3e304faad89ac65597f62526" +dependencies = [ + "comemo", + "ecow", + "indexmap 2.13.0", + "rustc-hash", + "stacker", + "toml 0.8.2", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", + "unicode-segmentation", +] + +[[package]] +name = "typst-html" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29f8da4f964d4c90739c3c1e0288b0ba1bccc3cc50623a6d558300b86ca8aad" +dependencies = [ + "bumpalo", + "comemo", + "ecow", + "palette", + "rustc-hash", + "time", + "typst-assets", + "typst-library", + "typst-macros", + "typst-svg", + "typst-syntax", + "typst-timing", + "typst-utils", +] + +[[package]] +name = "typst-layout" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cab0200105831a9158e63718a0f6141c78cb2c1722ed17d19ad28941e3b8491" +dependencies = [ + "az", + "bumpalo", + "codex", + "comemo", + "ecow", + "either", + "hypher", + "icu_properties 1.5.1", + "icu_provider 1.5.0", + "icu_provider_adapters", + "icu_provider_blob", + "icu_segmenter", + "kurbo 0.12.0", + "memchr", + "rustc-hash", + "rustybuzz", + "smallvec", + "ttf-parser", + "typst-assets", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", + "unicode-bidi", + "unicode-math-class", + "unicode-script", + "unicode-segmentation", +] + +[[package]] +name = "typst-library" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e276a5de53020c43efe2111ec236252e54ea4480b5ac18063e663dfbe03d9d1b" +dependencies = [ + "az", + "bitflags 2.10.0", + "bumpalo", + "chinese-number", + "ciborium", + "codex", + "comemo", + "csv", + "ecow", + "flate2", + "fontdb", + "glidesort", + "hayagriva", + "hayro-syntax", + "icu_properties 1.5.1", + "icu_provider 1.5.0", + "icu_provider_blob", + "image", + "indexmap 2.13.0", + "kamadak-exif", + "kurbo 0.12.0", + "lipsum", + "memchr", + "palette", + "phf 0.13.1", + "png 0.17.16", + "qcms", + "rayon", + "regex", + "regex-syntax", + "roxmltree", + "rust_decimal", + "rustc-hash", + "rustybuzz", + "serde", + "serde_json", + "serde_yaml", + "siphasher 1.0.2", + "smallvec", + "syntect", + "time", + "toml 0.8.2", + "ttf-parser", + "two-face", + "typed-arena", + "typst-assets", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", + "unicode-math-class", + "unicode-normalization", + "unicode-segmentation", + "unscanny", + "usvg", + "utf8_iter", + "wasmi", + "xmlwriter", +] + +[[package]] +name = "typst-macros" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141cbd1027129fbf6bda1013f52a264df7befc7388cc8f47767d65e803fd3a59" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "typst-pdf" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37c8a4630754767cd10d48e8b8186e7dc784631a30a3a93521edf7d77aebd0c0" +dependencies = [ + "az", + "bytemuck", + "comemo", + "ecow", + "image", + "indexmap 2.13.0", + "infer", + "krilla", + "krilla-svg", + "rustc-hash", + "serde", + "smallvec", + "typst-assets", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", +] + +[[package]] +name = "typst-realize" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +checksum = "f7ffe964757fb93d2e98978aa2a74ee85b0f94c8643e8f3550737258b58f39d8" dependencies = [ - "once_cell", - "valuable", + "arrayvec", + "bumpalo", + "comemo", + "ecow", + "regex", + "typst-library", + "typst-macros", + "typst-syntax", + "typst-timing", + "typst-utils", ] [[package]] -name = "tracing-subscriber" -version = "0.3.22" +name = "typst-svg" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "e46b811837ade1f0243ef0d8bf3fb06d166443090eac22c28643f374c2ccdc9d" dependencies = [ - "tracing-core", + "base64 0.22.1", + "comemo", + "ecow", + "flate2", + "hayro", + "hayro-svg", + "image", + "rustc-hash", + "ttf-parser", + "typst-assets", + "typst-library", + "typst-macros", + "typst-timing", + "typst-utils", + "xmlparser", + "xmlwriter", ] [[package]] -name = "tray-icon" -version = "0.21.3" +name = "typst-syntax" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e85aa143ceb072062fc4d6356c1b520a51d636e7bc8e77ec94be3608e5e80c" +checksum = "a95d9192060e23b1e491b0b94dff676acddc92a4d672aeb8ca3890a5a734e879" dependencies = [ - "crossbeam-channel", - "dirs", - "libappindicator", - "muda", - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation", - "once_cell", - "png", + "ecow", + "rustc-hash", "serde", - "thiserror 2.0.18", - "windows-sys 0.60.2", + "toml 0.8.2", + "typst-timing", + "typst-utils", + "unicode-ident", + "unicode-math-class", + "unicode-script", + "unicode-segmentation", + "unscanny", ] [[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typeid" -version = "1.0.3" +name = "typst-timing" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" +checksum = "7be94f8faf19841b49574ef5c7fd7a12e2deb7c3d8deba5a596f35d2222024cd" +dependencies = [ + "parking_lot", + "serde", + "serde_json", +] [[package]] -name = "typenum" -version = "1.19.0" +name = "typst-utils" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "a3966c92e8fa48c7ce898130d07000d985f18206d92b250f0f939287fbccdee3" +dependencies = [ + "once_cell", + "portable-atomic", + "rayon", + "rustc-hash", + "siphasher 1.0.2", + "thin-vec", + "unicode-math-class", +] [[package]] name = "uds_windows" @@ -5976,6 +7580,50 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" +[[package]] +name = "unic-langid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05" +dependencies = [ + "unic-langid-impl", + "unic-langid-macros", +] + +[[package]] +name = "unic-langid-impl" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658" +dependencies = [ + "serde", + "tinystr 0.8.2", +] + +[[package]] +name = "unic-langid-macros" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5957eb82e346d7add14182a3315a7e298f04e1ba4baac36f7f0dbfedba5fc25" +dependencies = [ + "proc-macro-hack", + "tinystr 0.8.2", + "unic-langid-impl", + "unic-langid-macros-impl", +] + +[[package]] +name = "unic-langid-macros-impl" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1249a628de3ad34b821ecb1001355bca3940bcb2f88558f1a8bd82e977f75b5" +dependencies = [ + "proc-macro-hack", + "quote", + "syn 2.0.114", + "unic-langid-impl", +] + [[package]] name = "unic-ucd-ident" version = "0.9.0" @@ -6002,12 +7650,30 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" +[[package]] +name = "unicode-bidi-mirroring" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" + +[[package]] +name = "unicode-ccc" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" + [[package]] name = "unicode-ident" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +[[package]] +name = "unicode-math-class" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d246cf599d5fae3c8d56e04b20eb519adb89a8af8d0b0fbcded369aa3647d65" + [[package]] name = "unicode-normalization" version = "0.1.25" @@ -6023,18 +7689,42 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" +[[package]] +name = "unicode-script" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" + [[package]] name = "unicode-segmentation" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "unicode-vo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" + [[package]] name = "unicode-xid" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "unscanny" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47" + [[package]] name = "untrusted" version = "0.9.0" @@ -6045,6 +7735,7 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" name = "upcount" version = "0.1.0" dependencies = [ + "base64 0.22.1", "chrono", "nanoid", "sentry", @@ -6060,6 +7751,9 @@ dependencies = [ "tauri-plugin-process", "tauri-plugin-updater", "tokio", + "typst-as-lib", + "typst-library", + "typst-pdf", ] [[package]] @@ -6116,6 +7810,33 @@ dependencies = [ "url", ] +[[package]] +name = "usvg" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" +dependencies = [ + "base64 0.22.1", + "data-url", + "flate2", + "fontdb", + "imagesize 0.13.0", + "kurbo 0.11.3", + "log", + "pico-args", + "roxmltree", + "rustybuzz", + "simplecss", + "siphasher 1.0.2", + "strict-num", + "svgtypes", + "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + [[package]] name = "utf-8" version = "0.7.6" @@ -6302,6 +8023,52 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmi" +version = "0.51.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb321403ce594274827657a908e13d1d9918aa02257b8bf8391949d9764023ff" +dependencies = [ + "spin", + "wasmi_collections", + "wasmi_core", + "wasmi_ir", + "wasmparser", +] + +[[package]] +name = "wasmi_collections" +version = "0.51.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9b8e98e45a2a534489f8225e765cbf1cb9a3078072605e58158910cf4749172" + +[[package]] +name = "wasmi_core" +version = "0.51.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c25f375c0cdf14810eab07f532f61f14d4966f09c747a55067fdf3196e8512e6" +dependencies = [ + "libm", +] + +[[package]] +name = "wasmi_ir" +version = "0.51.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624e2a68a4293ecb8f564260b68394b29cf3b3edba6bce35532889a2cb33c3d9" +dependencies = [ + "wasmi_core", +] + +[[package]] +name = "wasmparser" +version = "0.228.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4abf1132c1fdf747d56bbc1bb52152400c70f336870f968b85e89ea422198ae3" +dependencies = [ + "bitflags 2.10.0", +] + [[package]] name = "web-sys" version = "0.3.85" @@ -6420,6 +8187,12 @@ dependencies = [ "windows-core 0.61.2", ] +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + [[package]] name = "whoami" version = "1.6.1" @@ -6975,6 +8748,25 @@ version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +[[package]] +name = "write-fonts" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "886614b5ce857341226aa091f3c285e450683894acaaa7887f366c361efef79d" +dependencies = [ + "font-types", + "indexmap 2.13.0", + "kurbo 0.12.0", + "log", + "read-fonts", +] + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "writeable" version = "0.6.2" @@ -7057,6 +8849,45 @@ dependencies = [ "rustix", ] +[[package]] +name = "xmlparser" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" + +[[package]] +name = "xmlwriter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + +[[package]] +name = "xmp-writer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9440ea3e5aeabb0ac63af70daf835274065238cdd0cec83418f417eae38bacee" + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive 0.7.5", + "zerofrom", +] + [[package]] name = "yoke" version = "0.8.1" @@ -7064,10 +8895,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ "stable_deref_trait", - "yoke-derive", + "yoke-derive 0.8.1", "zerofrom", ] +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", + "synstructure", +] + [[package]] name = "yoke-derive" version = "0.8.1" @@ -7188,6 +9031,18 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +[[package]] +name = "zerotrie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb594dd55d87335c5f60177cee24f19457a5ec10a065e0a3014722ad252d0a1f" +dependencies = [ + "displaydoc", + "litemap 0.7.5", + "serde", + "zerovec 0.10.4", +] + [[package]] name = "zerotrie" version = "0.2.3" @@ -7195,8 +9050,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", - "yoke", + "yoke 0.8.1", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "serde", + "yoke 0.7.5", "zerofrom", + "zerovec-derive 0.10.3", ] [[package]] @@ -7205,9 +9072,21 @@ version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ - "yoke", + "serde", + "yoke 0.8.1", "zerofrom", - "zerovec-derive", + "zerovec-derive 0.11.2", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", ] [[package]] @@ -7233,12 +9112,48 @@ dependencies = [ "memchr", ] +[[package]] +name = "zlib-rs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" + [[package]] name = "zmij" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445" +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + +[[package]] +name = "zune-core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" + +[[package]] +name = "zune-jpeg" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" +dependencies = [ + "zune-core 0.4.12", +] + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core 0.5.1", +] + [[package]] name = "zvariant" version = "5.9.2" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index b497fa5..5b5ea45 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -33,6 +33,10 @@ tokio = { version = "1.49.0", features = ["full"] } nanoid = "0.4" chrono = { version = "0.4.43", features = ["serde"] } sentry = { version = "0.46", features = ["backtrace", "contexts", "panic", "anyhow"] } +typst-as-lib = "0.15" +typst-library = "0.14" +typst-pdf = "0.14" +base64 = "0.22" [features] # this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index b169b28..7a179a2 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -7,6 +7,7 @@ use crate::db::{ TimeEntry, CreateTimeEntryRequest, UpdateTimeEntryRequest, Project, CreateProjectRequest, UpdateProjectRequest }; +use crate::pdf; use tauri::{AppHandle, Manager, State}; use chrono::{DateTime, Utc}; use std::fs; @@ -457,4 +458,12 @@ pub async fn update_project( db.update_project(&project_id, updates) .await .map_err(|e| handle_db_error(e, "update_project")) +} + +#[tauri::command] +pub async fn generate_pdf( + request: pdf::PdfRequest, + logo_data: Option, +) -> Result, String> { + pdf::generate_invoice_pdf(&request, logo_data.as_deref()) } \ No newline at end of file diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 28c8306..3371dd4 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -3,6 +3,7 @@ mod commands; mod db; +mod pdf; use tauri::Manager; @@ -86,6 +87,7 @@ pub fn run() { commands::get_project, commands::create_project, commands::update_project, + commands::generate_pdf, ]) .run(tauri::generate_context!()) .map_err(|e| { diff --git a/src-tauri/src/pdf.rs b/src-tauri/src/pdf.rs new file mode 100644 index 0000000..1719a49 --- /dev/null +++ b/src-tauri/src/pdf.rs @@ -0,0 +1,141 @@ +use base64::Engine; +use serde::{Deserialize, Serialize}; +use typst_library::foundations::{Dict, IntoValue, Str}; +use typst_as_lib::TypstEngine; + +static TEMPLATE: &str = include_str!("../templates/invoice.typ"); + +static FONT_REGULAR: &[u8] = include_bytes!("../../public/fonts/montserrat/Montserrat-Regular.ttf"); +static FONT_MEDIUM: &[u8] = include_bytes!("../../public/fonts/montserrat/Montserrat-Medium.ttf"); +static FONT_SEMIBOLD: &[u8] = + include_bytes!("../../public/fonts/montserrat/Montserrat-SemiBold.ttf"); +static FONT_BOLD: &[u8] = include_bytes!("../../public/fonts/montserrat/Montserrat-Bold.ttf"); +static FONT_ITALIC: &[u8] = include_bytes!("../../public/fonts/montserrat/Montserrat-Italic.ttf"); +static FONT_MEDIUM_ITALIC: &[u8] = + include_bytes!("../../public/fonts/montserrat/Montserrat-MediumItalic.ttf"); + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PdfInvoice { + pub number: String, + pub date: String, + pub due_date: String, + pub overdue_charge: Option, + pub customer_notes: Option, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PdfClient { + pub name: String, + pub address: Option, + pub email: Option, + pub website: Option, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PdfOrganization { + pub name: String, + pub address: Option, + pub email: Option, + pub website: Option, + pub bank_name: Option, + pub iban: Option, + pub registration_number: Option, + pub vatin: Option, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PdfLineItem { + pub description: String, + pub quantity: String, + pub unit_price: String, + pub tax_pct: String, + pub total: String, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PdfTaxGroup { + pub name: String, + pub amount: String, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PdfLabels { + pub invoice: String, + pub date: String, + pub due_date: String, + pub overdue_charge: String, + pub description: String, + pub qty: String, + pub price: String, + pub tax: String, + pub total: String, + pub subtotal: String, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PdfRequest { + pub invoice: PdfInvoice, + pub client: PdfClient, + pub organization: PdfOrganization, + pub line_items: Vec, + pub subtotal: String, + pub tax_groups: Vec, + pub total: String, + pub labels: PdfLabels, + pub has_logo: bool, +} + +fn decode_data_url(data_url: &str) -> Option> { + let parts: Vec<&str> = data_url.splitn(2, ',').collect(); + if parts.len() != 2 { + return None; + } + base64::engine::general_purpose::STANDARD + .decode(parts[1]) + .ok() +} + +pub fn generate_invoice_pdf( + request: &PdfRequest, + logo_data: Option<&str>, +) -> Result, String> { + let json_data = + serde_json::to_string(request).map_err(|e| format!("Failed to serialize data: {}", e))?; + + let logo_bytes = logo_data.and_then(decode_data_url); + + let mut builder = TypstEngine::builder() + .main_file(TEMPLATE) + .fonts([ + FONT_REGULAR, + FONT_MEDIUM, + FONT_SEMIBOLD, + FONT_BOLD, + FONT_ITALIC, + FONT_MEDIUM_ITALIC, + ]); + + if let Some(ref bytes) = logo_bytes { + builder = builder.with_static_file_resolver([("logo.png", bytes.as_slice())]); + } + + let engine = builder.build(); + + let mut input = Dict::new(); + input.insert(Str::from("data"), json_data.into_value()); + + let doc = engine + .compile_with_input(input) + .output + .map_err(|e| format!("Typst compilation error: {:?}", e))?; + + let options = Default::default(); + typst_pdf::pdf(&doc, &options).map_err(|e| format!("PDF generation error: {:?}", e)) +} diff --git a/src-tauri/templates/invoice.typ b/src-tauri/templates/invoice.typ new file mode 100644 index 0000000..1011acd --- /dev/null +++ b/src-tauri/templates/invoice.typ @@ -0,0 +1,174 @@ +// ── Data input from sys.inputs ────────────────────────────────────────────── +#let data = json.decode(sys.inputs.at("data")) +#let invoice = data.invoice +#let client = data.client +#let org = data.organization +#let line_items = data.lineItems +#let subtotal = data.subtotal +#let tax_groups = data.taxGroups +#let total = data.total +#let labels = data.labels +#let has-logo = data.hasLogo + +// ── Page setup ────────────────────────────────────────────────────────────── +#set page(paper: "a4", margin: 50pt) +#set text(font: "Montserrat", size: 10pt) + +// ── Header: Invoice title + logo ──────────────────────────────────────────── +#grid( + columns: (1fr, 1fr), + align(left + horizon)[ + #text(size: 24pt, weight: "semibold")[#labels.invoice #invoice.number] + ], + align(right + horizon)[ + #if has-logo { + image("logo.png", width: 120pt) + } + ], +) + +#v(36pt) + +// ── Client and Organization details ───────────────────────────────────────── +#grid( + columns: (1fr, 1fr), + [ + #text(size: 12pt)[#client.name] + #v(8pt) + #set text(size: 8pt) + #set par(spacing: 0.65em) + #client.address + #v(4pt) + #client.email \ + #client.website + ], + align(right)[ + #text(size: 12pt)[#org.name] + #v(8pt) + #set text(size: 8pt) + #set par(spacing: 0.65em) + #org.address + #v(4pt) + #org.email \ + #org.website + ], +) + +#v(36pt) + +// ── Metadata: Date, Due date, Overdue charge ──────────────────────────────── +#grid( + columns: (20%, auto), + row-gutter: 8pt, + text(size: 8pt)[#labels.date], + text(size: 8pt)[#invoice.date], + text(size: 8pt)[#labels.dueDate], + text(size: 8pt)[#invoice.dueDate], + ..if invoice.overdueCharge != none { + ( + text(size: 8pt)[#labels.overdueCharge], + text(size: 8pt)[#invoice.overdueCharge], + ) + } else { + () + }, +) + +#v(36pt) + +// ── Line items table ──────────────────────────────────────────────────────── +#let border-color = rgb("868686") +#let col-widths = (4%, 56%, 10%, 10%, 10%, 10%) +#let item-count = line_items.len() + +// Header row +#grid( + columns: col-widths, + column-gutter: 0pt, + ..{ + let headers = ( + [\#], + [#labels.description], + [#labels.qty], + [#labels.price], + [#labels.tax], + align(right)[#labels.total], + ) + headers.map(h => pad(y: 2pt)[#text(size: 8pt, weight: "medium")[#h]]) + }, +) +#line(length: 100%, stroke: 2pt + border-color) + +// Data rows +#for (i, item) in line_items.enumerate() { + grid( + columns: col-widths, + column-gutter: 0pt, + pad(y: 4pt)[#text(size: 8pt)[#str(i + 1)]], + pad(y: 4pt)[#text(size: 8pt)[#item.description]], + pad(y: 4pt)[#text(size: 8pt)[#item.quantity]], + pad(y: 4pt)[#text(size: 8pt)[#item.unitPrice]], + pad(y: 4pt)[#text(size: 8pt)[#item.taxPct]], + pad(y: 4pt)[#align(right)[#text(size: 8pt)[#item.total]]], + ) + if i == item-count - 1 { + line(length: 100%, stroke: 2pt + border-color) + } else { + line(length: 100%, stroke: 0.5pt + border-color) + } +} + +#v(4pt) + +// ── Notes + Summary ───────────────────────────────────────────────────────── +#grid( + columns: (60%, 40%), + // Left: customer notes + pad(right: 20pt, top: 4pt)[ + #if invoice.customerNotes != none { + text(size: 9pt, style: "italic")[#invoice.customerNotes] + } + ], + // Right: totals + [ + // Subtotal + #grid( + columns: (1fr, auto), + pad(y: 4pt)[#text(size: 8pt)[#labels.subtotal]], + pad(y: 4pt)[#align(right)[#text(size: 8pt)[#subtotal]]], + ) + // Tax groups + #for group in tax_groups { + grid( + columns: (1fr, auto), + pad(y: 4pt)[#text(size: 8pt)[#group.name]], + pad(y: 4pt)[#align(right)[#text(size: 8pt)[#group.amount]]], + ) + } + // Total + #v(8pt) + #line(length: 100%, stroke: 2pt + border-color) + #grid( + columns: (1fr, auto), + pad(top: 8pt, bottom: 4pt)[#text(size: 8pt, weight: "bold")[#labels.total]], + pad(top: 8pt, bottom: 4pt)[#align(right)[#text(size: 8pt, weight: "bold")[#total]]], + ) + ], +) + +// ── Footer ────────────────────────────────────────────────────────────────── +#place( + bottom + left, + dx: 0pt, + dy: 20pt, + block(width: 100%)[ + #line(length: 100%, stroke: 0.5pt + border-color) + #v(3pt) + #grid( + columns: (1fr, 1fr, 1fr), + text(size: 10pt)[#org.bankName #org.iban], + align(center)[#text(size: 10pt)[Reg. nr #org.registrationNumber]], + align(right)[#text(size: 10pt)[VATIN #org.vatin]], + ) + ], +) diff --git a/src-tauri/templates/quotation.typ b/src-tauri/templates/quotation.typ new file mode 100644 index 0000000..9175610 --- /dev/null +++ b/src-tauri/templates/quotation.typ @@ -0,0 +1,202 @@ +// ── Sample data (will be replaced by JSON input in integration phase) ──────── +#let quotation = ( + number: "QUO-2026-018", + date: "06.05.2026", + valid_until: "06.06.2026", + customer_notes: "This quotation is valid for 30 days from the date of issue. Prices are subject to change after the validity period.", +) + +#let client = ( + name: "Acme Corporation", + address: "123 Business Street\nTallinn 10115\nEstonia", + email: "billing@acme.ee", + website: "www.acme.ee", +) + +#let org = ( + name: "Upcount OÜ", + address: "Pärnu mnt 15\nTallinn 10141\nEstonia", + email: "hello@upcount.ee", + website: "www.upcount.ee", + bank_name: "SEB", + iban: "EE901010220123456789", + registration_number: "16123456", + vatin: "EE102345678", +) + +#let line_items = ( + (description: "Website design and development", quantity: "1", unit_price: "€4,500.00", tax_pct: "22%", total: "€4,500.00"), + (description: "Hosting setup and configuration for production and staging environments", quantity: "2", unit_price: "€150.00", tax_pct: "22%", total: "€300.00"), + (description: "SEO audit and optimization", quantity: "1", unit_price: "€800.00", tax_pct: "22%", total: "€800.00"), + (description: "Consulting", quantity: "3", unit_price: "€120.00", tax_pct: "0%", total: "€360.00"), +) + +#let subtotal = "€5,960.00" +#let tax_groups = ( + (name: "VAT 22%", amount: "€1,232.00"), + (name: "Tax 0%", amount: "€0.00"), +) +#let total = "€7,192.00" + +#let labels = ( + quotation: "Quotation", + date: "Date", + valid_until: "Valid until", + description: "Description", + qty: "Qty.", + price: "Price", + tax: "Tax %", + total: "Total", + subtotal: "Subtotal", +) + +// ── Page setup ────────────────────────────────────────────────────────────── +#set page(paper: "a4", margin: 50pt) +#set text(font: "Montserrat", size: 10pt) + +// ── Header: Quotation title + logo ───────────────────────────────────────── +#grid( + columns: (1fr, 1fr), + align(left + horizon)[ + #text(size: 24pt, weight: "semibold")[#labels.quotation #quotation.number] + ], + align(right + horizon)[], +) + +#v(36pt) + +// ── Client and Organization details ───────────────────────────────────────── +#grid( + columns: (1fr, 1fr), + [ + #text(size: 12pt)[#client.name] + #v(8pt) + #set text(size: 8pt) + #set par(spacing: 0.65em) + #client.address + #v(4pt) + #client.email \ + #client.website + ], + align(right)[ + #text(size: 12pt)[#org.name] + #v(8pt) + #set text(size: 8pt) + #set par(spacing: 0.65em) + #org.address + #v(4pt) + #org.email \ + #org.website + ], +) + +#v(36pt) + +// ── Metadata: Date, Valid until ───────────────────────────────────────────── +#grid( + columns: (20%, auto), + row-gutter: 8pt, + text(size: 8pt)[#labels.date], + text(size: 8pt)[#quotation.date], + text(size: 8pt)[#labels.valid_until], + text(size: 8pt)[#quotation.valid_until], +) + +#v(36pt) + +// ── Line items table ──────────────────────────────────────────────────────── +#let border-color = rgb("868686") +#let col-widths = (4%, 56%, 10%, 10%, 10%, 10%) +#let item-count = line_items.len() + +// Header row +#grid( + columns: col-widths, + column-gutter: 0pt, + ..{ + let headers = ( + [\#], + [#labels.description], + [#labels.qty], + [#labels.price], + [#labels.tax], + align(right)[#labels.total], + ) + headers.map(h => pad(y: 2pt)[#text(size: 8pt, weight: "medium")[#h]]) + }, +) +#line(length: 100%, stroke: 2pt + border-color) + +// Data rows +#for (i, item) in line_items.enumerate() { + grid( + columns: col-widths, + column-gutter: 0pt, + pad(y: 4pt)[#text(size: 8pt)[#str(i + 1)]], + pad(y: 4pt)[#text(size: 8pt)[#item.description]], + pad(y: 4pt)[#text(size: 8pt)[#item.quantity]], + pad(y: 4pt)[#text(size: 8pt)[#item.unit_price]], + pad(y: 4pt)[#text(size: 8pt)[#item.tax_pct]], + pad(y: 4pt)[#align(right)[#text(size: 8pt)[#item.total]]], + ) + if i == item-count - 1 { + line(length: 100%, stroke: 2pt + border-color) + } else { + line(length: 100%, stroke: 0.5pt + border-color) + } +} + +#v(4pt) + +// ── Notes + Summary ───────────────────────────────────────────────────────── +#grid( + columns: (60%, 40%), + // Left: customer notes + pad(right: 20pt, top: 4pt)[ + #if quotation.customer_notes != none { + text(size: 9pt, style: "italic")[#quotation.customer_notes] + } + ], + // Right: totals + [ + // Subtotal + #grid( + columns: (1fr, auto), + pad(y: 4pt)[#text(size: 8pt)[#labels.subtotal]], + pad(y: 4pt)[#align(right)[#text(size: 8pt)[#subtotal]]], + ) + // Tax groups + #for group in tax_groups { + grid( + columns: (1fr, auto), + pad(y: 4pt)[#text(size: 8pt)[#group.name]], + pad(y: 4pt)[#align(right)[#text(size: 8pt)[#group.amount]]], + ) + } + // Total + #v(8pt) + #line(length: 100%, stroke: 2pt + border-color) + #grid( + columns: (1fr, auto), + pad(top: 8pt, bottom: 4pt)[#text(size: 8pt, weight: "bold")[#labels.total]], + pad(top: 8pt, bottom: 4pt)[#align(right)[#text(size: 8pt, weight: "bold")[#total]]], + ) + ], +) + +// ── Footer ────────────────────────────────────────────────────────────────── +#place( + bottom + left, + dx: 0pt, + dy: 20pt, + block(width: 100%)[ + #line(length: 100%, stroke: 0.5pt + border-color) + #v(3pt) + #grid( + columns: (1fr, 1fr, 1fr), + text(size: 10pt)[#org.bank_name #org.iban], + align(center)[#text(size: 10pt)[Reg. nr #org.registration_number]], + align(right)[#text(size: 10pt)[VATIN #org.vatin]], + ) + ], +) diff --git a/src/components/invoices/pdf.tsx b/src/components/invoices/pdf.tsx deleted file mode 100644 index abf2fc2..0000000 --- a/src/components/invoices/pdf.tsx +++ /dev/null @@ -1,455 +0,0 @@ -import { Trans } from "@lingui/react/macro"; -import { I18nProvider } from "@lingui/react"; -import { Document, Font, Page, Text, View, StyleSheet, Image } from "@react-pdf/renderer"; - -import { getFormattedNumber } from "src/utils/currencies"; -import { formatDate } from "src/utils/date"; - -Font.register({ - family: "Montserrat", - fonts: [ - { - src: "/fonts/montserrat/Montserrat-Thin.ttf", - fontWeight: 100, - }, - { - src: "/fonts/montserrat/Montserrat-ExtraLight.ttf", - fontWeight: 200, - }, - { - src: "/fonts/montserrat/Montserrat-Light.ttf", - fontWeight: 300, - }, - { - src: "/fonts/montserrat/Montserrat-Regular.ttf", - fontWeight: 400, - }, - { - src: "/fonts/montserrat/Montserrat-Medium.ttf", - fontWeight: 500, - }, - { - src: "/fonts/montserrat/Montserrat-SemiBold.ttf", - fontWeight: 600, - }, - { - src: "/fonts/montserrat/Montserrat-Bold.ttf", - fontWeight: 700, - }, - { - src: "/fonts/montserrat/Montserrat-ExtraBold.ttf", - fontWeight: 800, - }, - { - src: "/fonts/montserrat/Montserrat-Black.ttf", - fontWeight: 900, - }, - ], -}); - -const styles = StyleSheet.create({ - container: { - flexDirection: "column", - padding: 50, - fontSize: 10, - }, - title: { - fontFamily: "Montserrat", - fontSize: 24, - fontWeight: "semibold", - }, - subtitle: { - fontFamily: "Montserrat", - fontSize: 12, - marginBottom: 8, - }, - text: { - fontFamily: "Montserrat", - fontSize: 10, - marginBottom: 2, - }, - smallText: { - fontFamily: "Montserrat", - fontSize: 8, - marginBottom: 2, - }, - medium: { - fontFamily: "Montserrat", - fontWeight: "medium", - }, - bold: { - fontFamily: "Montserrat", - fontWeight: "bold", - }, - - /* Table */ - table: { - // TODO: Check if can be removed - // @ts-expect-error - "table" is not a valid display value - display: "table", - width: "auto", - }, - tableRow: { - flexDirection: "row", - }, - tableRowBordered: { - borderTopStyle: "solid", - borderRightStyle: "solid", - borderBottomStyle: "solid", - borderLeftStyle: "solid", - borderTopWidth: 0, - borderRightWidth: 0, - borderBottomWidth: 0.5, - borderLeftWidth: 0, - borderBottomColor: "#868686", - }, - tableRowBorderedBold: { - borderBottomWidth: 2, - }, - tableCol: { - fontFamily: "Montserrat", - fontSize: 8, - padding: 8, - }, - tableColFirst: { - paddingLeft: 0, - }, - tableColLast: { - paddingRight: 0, - }, - tableHeader: { - fontWeight: "medium", - }, - - /* Line items */ - lineItemNumber: { - width: "4%", - }, - lineItemDescription: { - width: "56%", - }, - lineItemQuantity: { - width: "10%", - }, - lineItemUnitPrice: { - width: "10%", - textAlign: "left", - }, - lineItemTotal: { - width: "10%", - textAlign: "right", - }, - lineItemTax: { - width: "10%", - textAlign: "left", - }, - - notes: { - fontFamily: "Montserrat", - fontSize: 8, - }, - - row: { - flexDirection: "row", - marginBottom: 36, - }, - column: { - width: "50%", - }, - - footer: { - position: "absolute", - bottom: 30, - left: 50, - right: 50, - borderTopStyle: "solid", - borderTopWidth: 0.5, - borderTopColor: "#868686", - paddingTop: 8, - flexDirection: "row", - justifyContent: "space-between", - }, -}); - -const InvoicePDF = ({ - invoice, - client, - organization, - taxRates, - i18n, -}: { - invoice: any; - client: any; - organization: any; - taxRates: any; - i18n: any; -}) => { - const dateFormat = organization?.date_format; - // Group line items by tax rate and calculate tax for each group - const taxGroups = (() => { - const groups: { [key: string]: { taxRate: any; items: any[]; subtotal: number; tax: number } } = - {}; - - invoice.lineItems?.forEach((item: any) => { - if (item.total) { - const taxRateId = item.taxRate || "no-tax"; - const taxRate = item.taxRate ? taxRates?.find((rate: any) => rate.id === taxRateId) : null; - - if (!groups[taxRateId]) { - groups[taxRateId] = { - taxRate, - items: [], - subtotal: 0, - tax: 0, - }; - } - - groups[taxRateId].items.push(item); - groups[taxRateId].subtotal += item.total; - groups[taxRateId].tax = taxRate?.percentage - ? (groups[taxRateId].subtotal * taxRate.percentage) / 100 - : 0; - } - }); - - return Object.values(groups); - })(); - return ( - - - - - - - Invoice {invoice.number} - - - - {organization.logo && ( - - )} - - - - - - {client.name} - {client.address} - {client.emails && - (() => { - // Handle both string (JSON) and array formats - let emailsArray: string[] = []; - try { - emailsArray = - typeof client.emails === "string" ? JSON.parse(client.emails) : client.emails; - } catch { - // If parsing fails, treat as empty array - emailsArray = []; - } - return emailsArray.length > 0 && emailsArray[0] ? ( - {emailsArray[0]} - ) : null; - })()} - {client.website} - - - {organization.name} - {organization.address} - {organization.email} - {organization.website} - - - - - - - Date - - - Due date - - {invoice.overdueCharge && ( - - Overdue charge - - )} - - - - {formatDate(invoice.date, dateFormat)} - - - {formatDate(invoice.dueDate, dateFormat)} - - {invoice.overdueCharge && ( - - {invoice.overdueCharge}% - - )} - - - - - - # - - Description - - - Qty. - - - Price - - - Tax % - - - Total - - - {invoice.lineItems?.map((lineItem: any, index: number) => { - const taxRate = taxRates?.find((rate: any) => rate.id === lineItem.taxRate); - const isLastItem = index === invoice.lineItems.length - 1; - return ( - - - {index + 1} - - - {lineItem.description} - - - {lineItem.quantity} - - - {getFormattedNumber( - lineItem.unitPrice, - invoice.currency, - i18n.locale, - organization, - )} - - - {taxRate ? `${taxRate.percentage}%` : ""} - - - {getFormattedNumber( - lineItem.total, - invoice.currency, - i18n.locale, - organization, - )} - - - ); - })} - - - - - {invoice.customerNotes && {invoice.customerNotes}} - - - - - - Subtotal - - - {getFormattedNumber( - invoice.subTotal, - invoice.currency, - i18n.locale, - organization, - )} - - - {taxGroups.map((group, index) => ( - - - {group.taxRate ? ( - `${group.taxRate.name} ${group.taxRate.percentage}%` - ) : ( - Tax 0% - )} - - - {getFormattedNumber(group.tax, invoice.currency, i18n.locale, organization)} - - - ))} - - - - - Total - - - {getFormattedNumber(invoice.total, invoice.currency, i18n.locale, organization)} - - - - - - - - - {organization.bank_name} {organization.iban} - - {organization.registration_number && ( - - Reg. nr {organization.registration_number} - - )} - {organization.vatin && ( - VATIN {organization.vatin} - )} - - - - - ); -}; - -export default InvoicePDF; diff --git a/src/routes/invoices/details.tsx b/src/routes/invoices/details.tsx index 51e84a5..8229b18 100644 --- a/src/routes/invoices/details.tsx +++ b/src/routes/invoices/details.tsx @@ -53,7 +53,7 @@ import { import { CSS } from "@dnd-kit/utilities"; import { save } from "@tauri-apps/plugin-dialog"; import { writeFile } from "@tauri-apps/plugin-fs"; -import { pdf } from "@react-pdf/renderer"; +import { invoke } from "@tauri-apps/api/core"; import { Document, Page } from "react-pdf"; import dayjs from "dayjs"; @@ -80,7 +80,7 @@ import isNumber from "lodash/isNumber"; import toNumber from "lodash/toNumber"; import { clientsAtom, setClientsAtom } from "src/atoms/client"; -import { useDatePickerFormat } from "src/utils/date"; +import { useDatePickerFormat, formatDate } from "src/utils/date"; import { invoiceIdAtom, invoiceAtom, @@ -91,8 +91,7 @@ import { organizationAtom, nextInvoiceNumberAtom } from "src/atoms/organization" import { taxRatesAtom, setTaxRatesAtom } from "src/atoms/tax-rate"; import { siderAtom } from "src/atoms/generic"; import ClientForm from "src/components/clients/form.tsx"; -import InvoicePDF from "src/components/invoices/pdf"; -import { currencies } from "src/utils/currencies"; +import { currencies, getFormattedNumber } from "src/utils/currencies"; import { generateInvoiceNumber } from "src/utils/invoice"; import { multiplyDecimal, divideDecimal, calculateTax, addDecimal } from "src/utils/currency"; @@ -145,80 +144,40 @@ const SortableRow: React.FC<{ ); }; -// PDF Preview component that generates blob manually (like PDF download) -const PDFPreview: React.FC<{ createPDFDocument: () => React.ReactElement | null }> = ({ - createPDFDocument, -}) => { +const PDFPreview: React.FC<{ + buildPdfRequest: () => { request: any; logoData: string | null } | null; +}> = ({ buildPdfRequest }) => { const [pdfUrl, setPdfUrl] = useState(null); const [loading, setLoading] = useState(false); const [error, setError] = useState(null); const [containerWidth, setContainerWidth] = useState(0); const siderCollapsed = useAtomValue(siderAtom); - // Callback ref that measures width when div is actually rendered const containerRef = useCallback((node: HTMLDivElement | null) => { if (node) { const measureWidth = () => { - const width = node.offsetWidth; - setContainerWidth(width - 40); // subtract some padding + setContainerWidth(node.offsetWidth - 40); }; - - // Initial measurement measureWidth(); - - // Re-measure on resize const handleResize = () => measureWidth(); window.addEventListener("resize", handleResize); - - // Store cleanup function for later use instead of returning it - const cleanup = () => { - window.removeEventListener("resize", handleResize); - }; - - // Store cleanup function on the node for later access - (node as any)._cleanup = cleanup; + (node as any)._cleanup = () => window.removeEventListener("resize", handleResize); } else { - // Node is being unmounted, run cleanup if it exists const prevNode = containerRef as any; - if (prevNode._cleanup) { - prevNode._cleanup(); - } + if (prevNode._cleanup) prevNode._cleanup(); } - // Don't return anything to avoid the warning }, []); - // Effect to re-measure when sidebar changes useEffect(() => { - // Trigger re-measurement when sidebar state changes - console.log("Sidebar state changed:", siderCollapsed); const timer = setTimeout(() => { - // Force a complete layout recalculation by triggering resize event window.dispatchEvent(new Event("resize")); - - // Wait a bit more for the resize event to be processed setTimeout(() => { const container = document.querySelector("[data-pdf-container]") as HTMLDivElement; - if (container && container.parentElement) { - // Use the parent element's width instead of the container's width - const parentWidth = container.parentElement.offsetWidth; - const containerWidth = container.offsetWidth; - const windowWidth = window.innerWidth; - - console.log("Sidebar change measurements:", { - containerWidth, - parentWidth, - windowWidth, - siderCollapsed, - usingParentWidth: true, - finalWidth: parentWidth - 40, - }); - - // Use parent width instead of container width - setContainerWidth(parentWidth - 40); + if (container?.parentElement) { + setContainerWidth(container.parentElement.offsetWidth - 40); } }, 100); }, 500); - return () => clearTimeout(timer); }, [siderCollapsed]); @@ -228,14 +187,18 @@ const PDFPreview: React.FC<{ createPDFDocument: () => React.ReactElement | null setError(null); try { - const document = createPDFDocument(); - if (!document) { + const result = buildPdfRequest(); + if (!result) { setError("Please select a client to view PDF preview."); setLoading(false); return; } - const blob = await pdf(document!).toBlob(); + const pdfBytes: number[] = await invoke("generate_pdf", { + request: result.request, + logoData: result.logoData, + }); + const blob = new Blob([new Uint8Array(pdfBytes)], { type: "application/pdf" }); const url = URL.createObjectURL(blob); setPdfUrl(url); } catch (err) { @@ -248,13 +211,12 @@ const PDFPreview: React.FC<{ createPDFDocument: () => React.ReactElement | null generatePDF(); - // Cleanup URL when component unmounts return () => { if (pdfUrl) { URL.revokeObjectURL(pdfUrl); } }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps -- Intentionally omitting createPDFDocument to prevent re-generation on width changes + }, []); // eslint-disable-line react-hooks/exhaustive-deps if (loading) { return ( @@ -461,39 +423,84 @@ const InvoiceDetails: React.FC = () => { const taxTotal = sum(map(taxGroups, "tax")); const total = addDecimal(subTotal, taxTotal); - // Helper function to create PDF document with current form data - const createPDFDocument = () => { - // Get current form values to include unsaved changes + const buildPdfRequest = () => { const formValues = form.getFieldsValue(); - const clientId = formValues.clientId; - const clientData = find(clients, { id: clientId }); - - // Return null if no client data found - if (!clientData) { - return null; + const clientData = find(clients, { id: formValues.clientId }); + if (!clientData) return null; + + const dateFormat = organization?.date_format; + const currency = formValues.currency || organization.currency; + const fmt = (n: number) => getFormattedNumber(n, currency, i18n.locale, organization); + + let clientEmail = ""; + try { + const emails = + typeof clientData.emails === "string" ? JSON.parse(clientData.emails) : clientData.emails; + clientEmail = emails?.[0] || ""; + } catch { + clientEmail = ""; } - // Create merged invoice data with form values and computed totals - const invoiceForPDF = { - ...invoice, // Start with database data - ...formValues, // Override with current form values - // Use computed totals from the current component state - subTotal, - taxTotal, - total, - // Ensure line items have the correct totals - lineItems: formValues.lineItems || [], + const items = (formValues.lineItems || []).filter((item: any) => isNumber(get(item, "total"))); + + const request = { + invoice: { + number: formValues.number || "", + date: formatDate(formValues.date, dateFormat), + dueDate: formatDate(formValues.dueDate, dateFormat), + overdueCharge: formValues.overdueCharge ? `${formValues.overdueCharge}%` : null, + customerNotes: formValues.customerNotes || null, + }, + client: { + name: clientData.name || "", + address: clientData.address || null, + email: clientEmail || null, + website: clientData.website || null, + }, + organization: { + name: organization.name || "", + address: organization.address || null, + email: organization.email || null, + website: organization.website || null, + bankName: organization.bank_name || null, + iban: organization.iban || null, + registrationNumber: organization.registration_number || null, + vatin: organization.vatin || null, + }, + lineItems: items.map((item: any) => { + const taxRate = find(taxRates, { id: item.taxRate }); + return { + description: item.description || "", + quantity: String(item.quantity ?? ""), + unitPrice: fmt(item.unitPrice), + taxPct: taxRate ? `${taxRate.percentage}%` : "", + total: fmt(item.total), + }; + }), + subtotal: fmt(subTotal), + taxGroups: taxGroups.map((group: any) => ({ + name: group.taxRate + ? `${group.taxRate.name} ${group.taxRate.percentage}%` + : i18n._("Tax 0%"), + amount: fmt(group.tax), + })), + total: fmt(total), + labels: { + invoice: i18n._("Invoice"), + date: i18n._("Date"), + dueDate: i18n._("Due date"), + overdueCharge: i18n._("Overdue charge"), + description: i18n._("Description"), + qty: i18n._("Qty."), + price: i18n._("Price"), + tax: i18n._("Tax %"), + total: i18n._("Total"), + subtotal: i18n._("Subtotal"), + }, + hasLogo: !!organization.logo, }; - return ( - - ); + return { request, logoData: organization.logo || null }; }; if (!organization) return null; @@ -1027,11 +1034,13 @@ const InvoiceDetails: React.FC = () => { }); if (!filePath) return; - const document = createPDFDocument(); - if (!document) return; - const blob = await pdf(document).toBlob(); - const contents = new Uint8Array(await blob.arrayBuffer()); - await writeFile(filePath, contents); + const result = buildPdfRequest(); + if (!result) return; + const pdfBytes: number[] = await invoke("generate_pdf", { + request: result.request, + logoData: result.logoData, + }); + await writeFile(filePath, new Uint8Array(pdfBytes)); }} > PDF @@ -1055,7 +1064,7 @@ const InvoiceDetails: React.FC = () => { {previewMode && ( // PDF Preview Mode - + )}