From b672ace6df9c74ed890d3f47aa69030afe93d475 Mon Sep 17 00:00:00 2001 From: Nick the Sick Date: Tue, 14 Jan 2025 12:15:53 +0100 Subject: [PATCH] feat: pdf static renderer --- packages/static-renderer/package.json | 3 +- .../src/json/react-pdf/index.ts | 2 + .../src/json/react-pdf/react-pdf.example.tsx | 66 +++ .../src/json/react-pdf/react-pdf.tsx | 69 +++ pnpm-lock.yaml | 406 ++++++++++++++++++ 5 files changed, 545 insertions(+), 1 deletion(-) create mode 100644 packages/static-renderer/src/json/react-pdf/index.ts create mode 100644 packages/static-renderer/src/json/react-pdf/react-pdf.example.tsx create mode 100644 packages/static-renderer/src/json/react-pdf/react-pdf.tsx diff --git a/packages/static-renderer/package.json b/packages/static-renderer/package.json index d3978a7a89..7c2bab5474 100644 --- a/packages/static-renderer/package.json +++ b/packages/static-renderer/package.json @@ -87,7 +87,8 @@ "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", + "@react-pdf/renderer": "^4.0.0" }, "repository": { "type": "git", diff --git a/packages/static-renderer/src/json/react-pdf/index.ts b/packages/static-renderer/src/json/react-pdf/index.ts new file mode 100644 index 0000000000..3e2272d16b --- /dev/null +++ b/packages/static-renderer/src/json/react-pdf/index.ts @@ -0,0 +1,2 @@ +export * from '../../pm/extensionRenderer.js' +export * from './react-pdf.js' diff --git a/packages/static-renderer/src/json/react-pdf/react-pdf.example.tsx b/packages/static-renderer/src/json/react-pdf/react-pdf.example.tsx new file mode 100644 index 0000000000..cfffa874d3 --- /dev/null +++ b/packages/static-renderer/src/json/react-pdf/react-pdf.example.tsx @@ -0,0 +1,66 @@ +import ReactPDF from '@react-pdf/renderer' + +import { renderJSONContentToReactPdf } from './react-pdf.js' + +/** + * This example demonstrates how to render a JSON representation of a node to a React element + * It does so without including Prosemirror or Tiptap, it is the lightest possible way to render JSON content + * But, since it doesn't include Prosemirror or Tiptap, it cannot automatically render marks or nodes for you. + * If you need that, you should use the `renderToReactElement` from `@tiptap/static-renderer` + * + * You have complete control over the rendering process. And can replace how each Node/Mark is rendered. + */ + +// eslint-disable-next-line no-console +const Element = renderJSONContentToReactPdf()({ + content: { + type: 'doc', + content: [ + { + type: 'heading', + content: [ + { + type: 'text', + text: 'hello world', + marks: [], + }, + ], + attrs: { level: 2 }, + }, + { + type: 'paragraph', + content: [ + { + type: 'text', + text: 'hello world', + marks: [], + }, + { + type: 'text', + text: 'hello world today is a test of this and of thathello world today is a test of this and of thathello world today is a test of this and of thathello world today is a test of this and of thathello world today is a test of this and of thathello world today is a test of this and of thathello world today is a test of this and of that', + marks: [], + }, + { + type: 'text', + text: 'hello world', + marks: [], + }, + { + type: 'text', + text: 'hello world', + marks: [], + }, + { + type: 'text', + text: 'hello world', + marks: [], + }, + ], + attrs: { level: 2 }, + }, + ], + attrs: {}, + }, +}) + +ReactPDF.render(Element as any, `${__dirname}/example.pdf`) diff --git a/packages/static-renderer/src/json/react-pdf/react-pdf.tsx b/packages/static-renderer/src/json/react-pdf/react-pdf.tsx new file mode 100644 index 0000000000..c14b0a7afa --- /dev/null +++ b/packages/static-renderer/src/json/react-pdf/react-pdf.tsx @@ -0,0 +1,69 @@ +import { Document, Page, StyleSheet, Text, View } from '@react-pdf/renderer' +import React from 'react' + +import { renderJSONContentToReactElement } from '../react/react.js' + +const styles = StyleSheet.create({ + page: { + flexDirection: 'row', + backgroundColor: '#E4E4E4', + }, + section: { + margin: 10, + padding: 10, + flexGrow: 1, + }, + h1: { + fontSize: 24, + fontWeight: 'bold', + marginVertical: 10, + }, + h2: { + fontSize: 20, + fontWeight: 'bold', + marginVertical: 10, + }, + h3: { + fontSize: 16, + fontWeight: 'bold', + marginVertical: 10, + }, + h4: { + fontSize: 14, + fontWeight: 'bold', + marginVertical: 10, + }, + h5: { + fontSize: 12, + fontWeight: 'bold', + marginVertical: 10, + }, + h6: { + fontSize: 10, + fontWeight: 'bold', + marginVertical: 10, + }, +}) + +export function renderJSONContentToReactPdf() { + return renderJSONContentToReactElement({ + nodeMapping: { + doc: ({ children }) => ( + + + {children} + + + ), + paragraph: ({ children }) => {children}, + text: ({ node }) => {node.text}, + heading: ({ node, children }) => { + const level = node.attrs.level + const hTag = `h${level}` as 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' + + return {children} + }, + }, + markMapping: {}, + }) +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6dbb522039..d1bcb85331 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -795,6 +795,9 @@ importers: packages/static-renderer: optionalDependencies: + '@react-pdf/renderer': + specifier: ^4.0.0 + version: 4.1.6(react@18.3.1) '@types/react': specifier: ^18.2.14 version: 18.3.18 @@ -2216,6 +2219,49 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@react-pdf/fns@3.0.0': + resolution: {integrity: sha512-ICbIWR93PE6+xf2Xd/fXYO1dAuiOAJaszEuGGv3wp5lLSeeelDXlEYLh6R05okxh28YqMzc0Qd85x6n6MtaLUQ==} + + '@react-pdf/font@3.0.1': + resolution: {integrity: sha512-s+0xrQabGoYDDZwVpz8PXp1ylwabqiMhzfyetvxBqjDuQ15PuoSkmUkKUOkfDzauuAqs0MLMvt+Pcv+NioLfzw==} + + '@react-pdf/image@3.0.1': + resolution: {integrity: sha512-Hd5F1LzjuzG4bL/ytaOYxwN/5ip8oFBYDHdpccOfYY87J/Ca7AL31SsuneLk9DtnwNM1BSAKXtBo/WDFY3r57A==} + + '@react-pdf/layout@4.2.0': + resolution: {integrity: sha512-/0jMhDKwZH0lQs3umNsOduaPtkK0IUpaBRUEv4udHVD9lB2VzYoSNeYsCu+MJMPJyByXj70OSWV7IMjWTCKwWw==} + + '@react-pdf/pdfkit@4.0.0': + resolution: {integrity: sha512-HaaAoBpoRGJ6c1ZOANNQZ3q6Ehmagqa8n40x+OZ5s9HcmUviZ34SCm+QBa42s1o4299M+Lgw3UoqpW7sHv3/Hg==} + + '@react-pdf/png-js@3.0.0': + resolution: {integrity: sha512-eSJnEItZ37WPt6Qv5pncQDxLJRK15eaRwPT+gZoujP548CodenOVp49GST8XJvKMFt9YqIBzGBV/j9AgrOQzVA==} + + '@react-pdf/primitives@4.0.0': + resolution: {integrity: sha512-yp4E0rDL03NaUp/CnDBz3HQNfH2Mzdlgku57yhTMGNzetwB0NJusXcjYg5XsTGIXnR7Tv80JKI4O4ajj+oaLeQ==} + + '@react-pdf/reconciler@1.1.3': + resolution: {integrity: sha512-4vqY0klmUH32kTFvuqdAszkOpwfZYKMLO4VpJ5xZWTsoUOLQSyhC2QM2QCj9eaxpB2Nd5Kl9uW+KfyutvZnMzQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + '@react-pdf/render@4.0.2': + resolution: {integrity: sha512-5QJB9sS0uU5ALTLxrtT073VT1imZhrzuOun+7kvo0nykeAr9I4lv0Shmy8rS4QhpmXn8ASmhd17WjCVm4DcJlw==} + + '@react-pdf/renderer@4.1.6': + resolution: {integrity: sha512-hfQ0PsuVqfoYxkYgmkj+HFkylbB1QTpXY1rnlgnzJlrlSoNXjzPrCa/ty8jcHOwYA2lNoazIAoDatBIsc8K5pw==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + '@react-pdf/stylesheet@5.2.0': + resolution: {integrity: sha512-ST19VumM9iRG0z8EjDJnyQCG+NhPFtYUCAh5B8HY237MrsRGvMgzcwrpyyqcyuLwHHYy7S4iw8EY0mK9+Qa2XQ==} + + '@react-pdf/textkit@5.0.1': + resolution: {integrity: sha512-4GdDiPA9l+If203hkh48slvRQmcmM3ecPLFTpXNMPrep/3retgvxUEXKMxI+xKclpw8tMzK/W6Z4hN9DgnxWMg==} + + '@react-pdf/types@2.7.0': + resolution: {integrity: sha512-7KrPPCpgRPKR+g+T127PE4bpw9Q84ZiY07EYRwXKVtTEVW9wJ5BZiF9smT9IvH19s+MQaDLmYRgjESsnqlyH0Q==} + '@remirror/core-constants@3.0.0': resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==} @@ -2360,6 +2406,9 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 + '@swc/helpers@0.5.15': + resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@types/conventional-commits-parser@5.0.1': resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} @@ -2582,6 +2631,9 @@ packages: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true + abs-svg-path@0.1.1: + resolution: {integrity: sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -2793,6 +2845,9 @@ packages: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} + 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'} @@ -2822,6 +2877,12 @@ 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.24.3: resolution: {integrity: sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -2970,6 +3031,10 @@ 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'} + code-red@1.0.4: resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} @@ -2986,6 +3051,9 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -3100,6 +3168,9 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} + crypto-js@4.2.0: + resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + css-tree@2.3.1: resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} @@ -3343,6 +3414,9 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + dfa@1.2.0: + resolution: {integrity: sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==} + didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -3760,6 +3834,9 @@ packages: debug: optional: true + fontkit@2.0.4: + resolution: {integrity: sha512-syetQadaUEDNdxdugga9CpEYVaQIxOwk7GlwZWWZ19//qW4zE5bknOKeMBDYAASwnpaSHKJITRLMF9m1fp3s6g==} + for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -3967,6 +4044,12 @@ packages: resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} engines: {node: '>=0.10.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-encoding-sniffer@3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -4006,6 +4089,9 @@ packages: engines: {node: '>=14'} hasBin: true + hyphen@1.10.6: + resolution: {integrity: sha512-fXHXcGFTXOvZTSkPJuGOQf5Lv5T/R2itiiCVPg9LxAje5D00O0pP83yJShFq5V89Ly//Gt6acj7z8pbBr34stw==} + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -4080,6 +4166,9 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + is-async-function@2.0.0: resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} engines: {node: '>= 0.4'} @@ -4222,6 +4311,9 @@ packages: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} + is-url@1.2.4: + resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==} + is-utf8@0.2.1: resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} @@ -4260,6 +4352,9 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jay-peg@1.1.1: + resolution: {integrity: sha512-D62KEuBxz/ip2gQKOEhk/mx14o7eiFRaU+VNNSP4MOiIkwb/D6B3G1Mfas7C/Fit8EsSV2/IWjZElx/Gs6A4ww==} + jest-worker@27.5.1: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} @@ -4512,6 +4607,9 @@ packages: mdurl@2.0.0: resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + media-engine@1.0.3: + resolution: {integrity: sha512-aa5tG6sDoK+k70B9iEX1NeyfT8ObCKhNDs6lJVpwF6r8vhUfuKMslIcirq6HIUYuuUYLefcEQOn9bSBOvawtwg==} + meow@12.1.1: resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} engines: {node: '>=16.10'} @@ -4632,6 +4730,9 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} + normalize-svg-path@1.1.0: + resolution: {integrity: sha512-r9KHKG2UUeB5LoTouwDzBy2VxXlHsiM6fyLQvnJa0S5hrhzqElH/CH7TUGhT1fVvIYBIKf3OpY4YJ4CK+iaqHg==} + npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -4772,6 +4873,12 @@ packages: package-manager-detector@0.2.8: resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} + 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'} @@ -4784,6 +4891,9 @@ packages: resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} engines: {node: '>=0.10.0'} + parse-svg-path@0.1.2: + resolution: {integrity: sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==} + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -4955,6 +5065,9 @@ packages: resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} engines: {node: '>=6'} + prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + property-information@6.5.0: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} @@ -5051,6 +5164,9 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + queue@6.0.2: + resolution: {integrity: sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==} + quick-lru@7.0.0: resolution: {integrity: sha512-MX8gB7cVYTrYcFfAnfLlhRd0+Toyl8yX8uBx1MrX7K0jegiz9TumwOK27ldXrgDlHRdVi+MqU9Ssw6dr4BNreg==} engines: {node: '>=18'} @@ -5069,6 +5185,9 @@ packages: peerDependencies: react: '>=16.13.1' + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + react-refresh@0.13.0: resolution: {integrity: sha512-XP8A9BT0CpRBD+NYLLeIhld/RqG9+gktUjW1FkE+Vm7OCinbG1SshcK5tb9ls4kzvjZr9mOQc7HYgBngEyPAXg==} engines: {node: '>=0.10.0'} @@ -5179,6 +5298,9 @@ packages: resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} engines: {node: '>=18'} + restructure@3.0.2: + resolution: {integrity: sha512-gSfoiOEA0VPE6Tukkrr7I0RBdE0s7H1eFCDBk05l1KIQT1UIKNc5JZy6jdyW6eYH3aR3g5b3PuL77rq0hvwtAw==} + reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -5244,6 +5366,9 @@ 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==} + schema-utils@3.3.0: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} @@ -5312,6 +5437,9 @@ packages: simple-peer@9.11.1: resolution: {integrity: sha512-D1SaWpOW8afq1CZGWB8xTfrT3FekjQmPValrqncJMX7QFl8YwhrPTZvMCANLtgBwwdS+7zURyqxDDEmY558tTw==} + simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + simplify-js@1.2.4: resolution: {integrity: sha512-vITfSlwt7h/oyrU42R83mtzFpwYk3+mkH9bOHqq/Qw6n8rtR7aE3NZQ5fbcyCUVVmuMJR6ynsAhOfK2qoah8Jg==} @@ -5465,6 +5593,9 @@ packages: resolution: {integrity: sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==} engines: {node: '>=16'} + svg-arc-to-cubic-bezier@3.2.0: + resolution: {integrity: sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g==} + tailwindcss@3.4.17: resolution: {integrity: sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==} engines: {node: '>=14.0.0'} @@ -5519,6 +5650,9 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + tiny-inflate@1.0.3: + resolution: {integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==} + tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -5706,10 +5840,16 @@ packages: resolution: {integrity: sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==} engines: {node: '>=4'} + unicode-properties@1.4.1: + resolution: {integrity: sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==} + unicode-property-aliases-ecmascript@2.1.0: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} + unicode-trie@2.0.0: + resolution: {integrity: sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==} + unicorn-magic@0.1.0: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} @@ -5797,6 +5937,10 @@ 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-plugin-checker@0.6.4: resolution: {integrity: sha512-2zKHH5oxr+ye43nReRbC2fny1nyARwhxdm0uNYp/ERy4YvU9iZpNOsueoi/luXw5gnpqRSvjcEPxXbS153O2wA==} engines: {node: '>=14.16'} @@ -6092,6 +6236,9 @@ packages: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} + yoga-layout@3.2.1: + resolution: {integrity: sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==} + zod-package-json@1.0.3: resolution: {integrity: sha512-Mb6GzuRyUEl8X+6V6xzHbd4XV0au/4gOYrYP+CAfHL32uPmGswES+v2YqonZiW1NZWVA3jkssCKSU2knonm/aQ==} engines: {node: '>=20'} @@ -7671,6 +7818,121 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@react-pdf/fns@3.0.0': + dependencies: + '@babel/runtime': 7.26.0 + optional: true + + '@react-pdf/font@3.0.1': + dependencies: + '@babel/runtime': 7.26.0 + '@react-pdf/types': 2.7.0 + fontkit: 2.0.4 + is-url: 1.2.4 + optional: true + + '@react-pdf/image@3.0.1': + dependencies: + '@babel/runtime': 7.26.0 + '@react-pdf/png-js': 3.0.0 + jay-peg: 1.1.1 + optional: true + + '@react-pdf/layout@4.2.0': + dependencies: + '@babel/runtime': 7.26.0 + '@react-pdf/fns': 3.0.0 + '@react-pdf/image': 3.0.1 + '@react-pdf/pdfkit': 4.0.0 + '@react-pdf/primitives': 4.0.0 + '@react-pdf/stylesheet': 5.2.0 + '@react-pdf/textkit': 5.0.1 + '@react-pdf/types': 2.7.0 + emoji-regex: 10.4.0 + queue: 6.0.2 + yoga-layout: 3.2.1 + optional: true + + '@react-pdf/pdfkit@4.0.0': + dependencies: + '@babel/runtime': 7.26.0 + '@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 + vite-compatible-readable-stream: 3.6.1 + optional: true + + '@react-pdf/png-js@3.0.0': + dependencies: + browserify-zlib: 0.2.0 + optional: true + + '@react-pdf/primitives@4.0.0': + optional: true + + '@react-pdf/reconciler@1.1.3(react@18.3.1)': + dependencies: + object-assign: 4.1.1 + react: 18.3.1 + scheduler: 0.25.0-rc-603e6108-20241029 + optional: true + + '@react-pdf/render@4.0.2': + dependencies: + '@babel/runtime': 7.26.0 + '@react-pdf/fns': 3.0.0 + '@react-pdf/primitives': 4.0.0 + '@react-pdf/textkit': 5.0.1 + '@react-pdf/types': 2.7.0 + 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 + optional: true + + '@react-pdf/renderer@4.1.6(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.0 + '@react-pdf/font': 3.0.1 + '@react-pdf/layout': 4.2.0 + '@react-pdf/pdfkit': 4.0.0 + '@react-pdf/primitives': 4.0.0 + '@react-pdf/reconciler': 1.1.3(react@18.3.1) + '@react-pdf/render': 4.0.2 + '@react-pdf/types': 2.7.0 + events: 3.3.0 + object-assign: 4.1.1 + prop-types: 15.8.1 + queue: 6.0.2 + react: 18.3.1 + optional: true + + '@react-pdf/stylesheet@5.2.0': + dependencies: + '@babel/runtime': 7.26.0 + '@react-pdf/fns': 3.0.0 + '@react-pdf/types': 2.7.0 + color-string: 1.9.1 + hsl-to-hex: 1.0.0 + media-engine: 1.0.3 + postcss-value-parser: 4.2.0 + optional: true + + '@react-pdf/textkit@5.0.1': + dependencies: + '@babel/runtime': 7.26.0 + '@react-pdf/fns': 3.0.0 + bidi-js: 1.0.3 + hyphen: 1.10.6 + unicode-properties: 1.4.1 + optional: true + + '@react-pdf/types@2.7.0': + optional: true + '@remirror/core-constants@3.0.0': {} '@rollup/pluginutils@4.2.1': @@ -7799,6 +8061,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@swc/helpers@0.5.15': + dependencies: + tslib: 2.8.1 + optional: true + '@types/conventional-commits-parser@5.0.1': dependencies: '@types/node': 22.10.3 @@ -8116,6 +8383,9 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 + abs-svg-path@0.1.1: + optional: true + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -8335,6 +8605,11 @@ snapshots: dependencies: is-windows: 1.0.2 + bidi-js@1.0.3: + dependencies: + require-from-string: 2.0.2 + optional: true + binary-extensions@2.3.0: {} bl@4.1.0: @@ -8364,6 +8639,16 @@ snapshots: dependencies: fill-range: 7.1.1 + brotli@1.3.3: + dependencies: + base64-js: 1.5.1 + optional: true + + browserify-zlib@0.2.0: + dependencies: + pako: 1.0.11 + optional: true + browserslist@4.24.3: dependencies: caniuse-lite: 1.0.30001690 @@ -8504,6 +8789,9 @@ snapshots: clone@1.0.4: {} + clone@2.1.2: + optional: true + code-red@1.0.4: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -8524,6 +8812,12 @@ snapshots: color-name@1.1.4: {} + color-string@1.9.1: + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + optional: true + colorette@2.0.20: {} combined-stream@1.0.8: @@ -8632,6 +8926,9 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + crypto-js@4.2.0: + optional: true + css-tree@2.3.1: dependencies: mdn-data: 2.0.30 @@ -8935,6 +9232,9 @@ snapshots: dependencies: dequal: 2.0.3 + dfa@1.2.0: + optional: true + didyoumean@1.2.2: {} dir-glob@3.0.1: @@ -9495,6 +9795,19 @@ snapshots: follow-redirects@1.15.9: {} + fontkit@2.0.4: + dependencies: + '@swc/helpers': 0.5.15 + 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 + optional: true + for-each@0.3.3: dependencies: is-callable: 1.2.7 @@ -9737,6 +10050,14 @@ snapshots: dependencies: parse-passwd: 1.0.0 + hsl-to-hex@1.0.0: + dependencies: + hsl-to-rgb-for-reals: 1.1.1 + optional: true + + hsl-to-rgb-for-reals@1.1.1: + optional: true + html-encoding-sniffer@3.0.0: dependencies: whatwg-encoding: 2.0.0 @@ -9791,6 +10112,9 @@ snapshots: husky@8.0.3: {} + hyphen@1.10.6: + optional: true + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -9865,6 +10189,9 @@ snapshots: is-arrayish@0.2.1: {} + is-arrayish@0.3.2: + optional: true + is-async-function@2.0.0: dependencies: has-tostringtag: 1.0.2 @@ -9993,6 +10320,9 @@ snapshots: is-unicode-supported@0.1.0: {} + is-url@1.2.4: + optional: true + is-utf8@0.2.1: {} is-weakmap@2.0.2: {} @@ -10024,6 +10354,11 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 + jay-peg@1.1.1: + dependencies: + restructure: 3.0.2 + optional: true + jest-worker@27.5.1: dependencies: '@types/node': 22.10.3 @@ -10273,6 +10608,9 @@ snapshots: mdurl@2.0.0: {} + media-engine@1.0.3: + optional: true + meow@12.1.1: {} merge-stream@2.0.0: {} @@ -10369,6 +10707,11 @@ snapshots: normalize-range@0.1.2: {} + normalize-svg-path@1.1.0: + dependencies: + svg-arc-to-cubic-bezier: 3.2.0 + optional: true + npm-run-path@4.0.1: dependencies: path-key: 3.1.1 @@ -10523,6 +10866,12 @@ snapshots: package-manager-detector@0.2.8: {} + pako@0.2.9: + optional: true + + pako@1.0.11: + optional: true + parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -10536,6 +10885,9 @@ snapshots: parse-passwd@1.0.0: {} + parse-svg-path@0.1.2: + optional: true + path-exists@4.0.0: {} path-exists@5.0.0: {} @@ -10666,6 +11018,13 @@ snapshots: prismjs@1.29.0: {} + prop-types@15.8.1: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + optional: true + property-information@6.5.0: {} prosemirror-changeset@2.2.1: @@ -10809,6 +11168,11 @@ snapshots: queue-microtask@1.2.3: {} + queue@6.0.2: + dependencies: + inherits: 2.0.4 + optional: true + quick-lru@7.0.0: {} randombytes@2.1.0: @@ -10826,6 +11190,9 @@ snapshots: '@babel/runtime': 7.26.0 react: 18.3.1 + react-is@16.13.1: + optional: true + react-refresh@0.13.0: {} react@18.3.1: @@ -10948,6 +11315,9 @@ snapshots: onetime: 7.0.0 signal-exit: 4.1.0 + restructure@3.0.2: + optional: true + reusify@1.0.4: {} rfdc@1.4.1: {} @@ -11034,6 +11404,9 @@ snapshots: dependencies: loose-envify: 1.4.0 + scheduler@0.25.0-rc-603e6108-20241029: + optional: true + schema-utils@3.3.0: dependencies: '@types/json-schema': 7.0.15 @@ -11134,6 +11507,11 @@ snapshots: transitivePeerDependencies: - supports-color + simple-swizzle@0.2.2: + dependencies: + is-arrayish: 0.3.2 + optional: true + simplify-js@1.2.4: {} slash@3.0.0: {} @@ -11313,6 +11691,9 @@ snapshots: magic-string: 0.30.17 periscopic: 3.1.0 + svg-arc-to-cubic-bezier@3.2.0: + optional: true + tailwindcss@3.4.17: dependencies: '@alloc/quick-lru': 5.2.0 @@ -11378,6 +11759,9 @@ snapshots: through@2.3.8: {} + tiny-inflate@1.0.3: + optional: true + tiny-invariant@1.3.3: {} tinyexec@0.3.2: {} @@ -11569,8 +11953,20 @@ snapshots: unicode-match-property-value-ecmascript@2.2.0: {} + unicode-properties@1.4.1: + dependencies: + base64-js: 1.5.1 + unicode-trie: 2.0.0 + optional: true + unicode-property-aliases-ecmascript@2.1.0: {} + unicode-trie@2.0.0: + dependencies: + pako: 0.2.9 + tiny-inflate: 1.0.3 + optional: true + unicorn-magic@0.1.0: {} union@0.5.0: @@ -11655,6 +12051,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 + vite-compatible-readable-stream@3.6.1: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + optional: true + vite-plugin-checker@0.6.4(eslint@8.57.1)(optionator@0.9.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.10.3)(sass@1.83.0)(terser@5.37.0)): dependencies: '@babel/code-frame': 7.26.2 @@ -11957,6 +12360,9 @@ snapshots: yocto-queue@1.1.1: {} + yoga-layout@3.2.1: + optional: true + zod-package-json@1.0.3: dependencies: zod: 3.24.1