diff --git a/.yarn/cache/@noble-ciphers-npm-1.3.0-73a7db337f-19722c3547.zip b/.yarn/cache/@noble-ciphers-npm-1.3.0-73a7db337f-19722c3547.zip new file mode 100644 index 00000000000..f788f1d698f Binary files /dev/null and b/.yarn/cache/@noble-ciphers-npm-1.3.0-73a7db337f-19722c3547.zip differ diff --git a/.yarn/cache/@noble-hashes-npm-1.8.0-a397449e64-c94e98b941.zip b/.yarn/cache/@noble-hashes-npm-1.8.0-a397449e64-c94e98b941.zip new file mode 100644 index 00000000000..43023c476a5 Binary files /dev/null and b/.yarn/cache/@noble-hashes-npm-1.8.0-a397449e64-c94e98b941.zip differ diff --git a/.yarn/cache/@react-pdf-fns-npm-3.1.2-5b68a05f5c-4e8cdd32f2.zip b/.yarn/cache/@react-pdf-fns-npm-3.1.2-5b68a05f5c-4e8cdd32f2.zip deleted file mode 100644 index 755e83d5dea..00000000000 Binary files a/.yarn/cache/@react-pdf-fns-npm-3.1.2-5b68a05f5c-4e8cdd32f2.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-fns-npm-3.1.3-c3350c5dc0-0cd27ef6cd.zip b/.yarn/cache/@react-pdf-fns-npm-3.1.3-c3350c5dc0-0cd27ef6cd.zip new file mode 100644 index 00000000000..8bc63888015 Binary files /dev/null and b/.yarn/cache/@react-pdf-fns-npm-3.1.3-c3350c5dc0-0cd27ef6cd.zip differ diff --git a/.yarn/cache/@react-pdf-font-npm-4.0.3-a46a328086-933e451381.zip b/.yarn/cache/@react-pdf-font-npm-4.0.3-a46a328086-933e451381.zip deleted file mode 100644 index ffd8bc2bc89..00000000000 Binary files a/.yarn/cache/@react-pdf-font-npm-4.0.3-a46a328086-933e451381.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-font-npm-4.0.8-9024a8179e-8343c363ea.zip b/.yarn/cache/@react-pdf-font-npm-4.0.8-9024a8179e-8343c363ea.zip new file mode 100644 index 00000000000..752bf76b612 Binary files /dev/null and b/.yarn/cache/@react-pdf-font-npm-4.0.8-9024a8179e-8343c363ea.zip differ diff --git a/.yarn/cache/@react-pdf-image-npm-3.0.3-9bc75136a5-893ebef74d.zip b/.yarn/cache/@react-pdf-image-npm-3.0.3-9bc75136a5-893ebef74d.zip deleted file mode 100644 index 830b611aae7..00000000000 Binary files a/.yarn/cache/@react-pdf-image-npm-3.0.3-9bc75136a5-893ebef74d.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-image-npm-3.1.0-0bd9bba15e-7054b84ada.zip b/.yarn/cache/@react-pdf-image-npm-3.1.0-0bd9bba15e-7054b84ada.zip new file mode 100644 index 00000000000..be406e262f0 Binary files /dev/null and b/.yarn/cache/@react-pdf-image-npm-3.1.0-0bd9bba15e-7054b84ada.zip differ diff --git a/.yarn/cache/@react-pdf-layout-npm-4.4.1-8639686b1e-5d7baa7f92.zip b/.yarn/cache/@react-pdf-layout-npm-4.4.1-8639686b1e-5d7baa7f92.zip deleted file mode 100644 index 6626ca0dd59..00000000000 Binary files a/.yarn/cache/@react-pdf-layout-npm-4.4.1-8639686b1e-5d7baa7f92.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-layout-npm-4.6.1-b12fdb71f4-83ed94e0d0.zip b/.yarn/cache/@react-pdf-layout-npm-4.6.1-b12fdb71f4-83ed94e0d0.zip new file mode 100644 index 00000000000..2c8d3e23982 Binary files /dev/null and b/.yarn/cache/@react-pdf-layout-npm-4.6.1-b12fdb71f4-83ed94e0d0.zip differ diff --git a/.yarn/cache/@react-pdf-pdfkit-npm-4.0.4-c8d40f5e0b-706cf5bc03.zip b/.yarn/cache/@react-pdf-pdfkit-npm-4.0.4-c8d40f5e0b-706cf5bc03.zip deleted file mode 100644 index 17615810d59..00000000000 Binary files a/.yarn/cache/@react-pdf-pdfkit-npm-4.0.4-c8d40f5e0b-706cf5bc03.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-pdfkit-npm-5.1.1-b05712b991-157af7e765.zip b/.yarn/cache/@react-pdf-pdfkit-npm-5.1.1-b05712b991-157af7e765.zip new file mode 100644 index 00000000000..9cd81eeea9a Binary files /dev/null and b/.yarn/cache/@react-pdf-pdfkit-npm-5.1.1-b05712b991-157af7e765.zip differ diff --git a/.yarn/cache/@react-pdf-png-js-npm-3.0.0-17565fff9e-90c1612d75.zip b/.yarn/cache/@react-pdf-png-js-npm-3.0.0-17565fff9e-90c1612d75.zip deleted file mode 100644 index ffcd4083ad5..00000000000 Binary files a/.yarn/cache/@react-pdf-png-js-npm-3.0.0-17565fff9e-90c1612d75.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-primitives-npm-4.1.1-80eed5afd4-adadff1996.zip b/.yarn/cache/@react-pdf-primitives-npm-4.1.1-80eed5afd4-adadff1996.zip deleted file mode 100644 index ee5f1e0a866..00000000000 Binary files a/.yarn/cache/@react-pdf-primitives-npm-4.1.1-80eed5afd4-adadff1996.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-primitives-npm-4.3.0-75975d0ee7-391f48e09a.zip b/.yarn/cache/@react-pdf-primitives-npm-4.3.0-75975d0ee7-391f48e09a.zip new file mode 100644 index 00000000000..f9b0923a86f Binary files /dev/null and b/.yarn/cache/@react-pdf-primitives-npm-4.3.0-75975d0ee7-391f48e09a.zip differ diff --git a/.yarn/cache/@react-pdf-reconciler-npm-1.1.4-0a87628369-d920898a1c.zip b/.yarn/cache/@react-pdf-reconciler-npm-1.1.4-0a87628369-d920898a1c.zip deleted file mode 100644 index cc19ec267db..00000000000 Binary files a/.yarn/cache/@react-pdf-reconciler-npm-1.1.4-0a87628369-d920898a1c.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-reconciler-npm-2.0.0-00957b9834-249df947f0.zip b/.yarn/cache/@react-pdf-reconciler-npm-2.0.0-00957b9834-249df947f0.zip new file mode 100644 index 00000000000..19a79bdb511 Binary files /dev/null and b/.yarn/cache/@react-pdf-reconciler-npm-2.0.0-00957b9834-249df947f0.zip differ diff --git a/.yarn/cache/@react-pdf-render-npm-4.3.1-27f48b54c0-2dfea722c1.zip b/.yarn/cache/@react-pdf-render-npm-4.3.1-27f48b54c0-2dfea722c1.zip deleted file mode 100644 index bb655d45213..00000000000 Binary files a/.yarn/cache/@react-pdf-render-npm-4.3.1-27f48b54c0-2dfea722c1.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-render-npm-4.5.1-d592ded218-2ece333774.zip b/.yarn/cache/@react-pdf-render-npm-4.5.1-d592ded218-2ece333774.zip new file mode 100644 index 00000000000..a9d2dd6ee70 Binary files /dev/null and b/.yarn/cache/@react-pdf-render-npm-4.5.1-d592ded218-2ece333774.zip differ diff --git a/.yarn/cache/@react-pdf-renderer-npm-4.3.1-2c58b5a4d3-0e9e2d9b30.zip b/.yarn/cache/@react-pdf-renderer-npm-4.3.1-2c58b5a4d3-0e9e2d9b30.zip deleted file mode 100644 index 77b8cebeb23..00000000000 Binary files a/.yarn/cache/@react-pdf-renderer-npm-4.3.1-2c58b5a4d3-0e9e2d9b30.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-renderer-npm-4.5.1-ab299db753-55046bcba4.zip b/.yarn/cache/@react-pdf-renderer-npm-4.5.1-ab299db753-55046bcba4.zip new file mode 100644 index 00000000000..9b43108d18e Binary files /dev/null and b/.yarn/cache/@react-pdf-renderer-npm-4.5.1-ab299db753-55046bcba4.zip differ diff --git a/.yarn/cache/@react-pdf-stylesheet-npm-6.1.1-de82babf5a-129d5e01ec.zip b/.yarn/cache/@react-pdf-stylesheet-npm-6.1.1-de82babf5a-129d5e01ec.zip deleted file mode 100644 index 2dfd2196954..00000000000 Binary files a/.yarn/cache/@react-pdf-stylesheet-npm-6.1.1-de82babf5a-129d5e01ec.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-stylesheet-npm-6.2.1-a76dfb3da3-b5fdedf290.zip b/.yarn/cache/@react-pdf-stylesheet-npm-6.2.1-a76dfb3da3-b5fdedf290.zip new file mode 100644 index 00000000000..1d88d544a72 Binary files /dev/null and b/.yarn/cache/@react-pdf-stylesheet-npm-6.2.1-a76dfb3da3-b5fdedf290.zip differ diff --git a/.yarn/cache/@react-pdf-svg-npm-1.1.0-5a97c07518-23c3052ee0.zip b/.yarn/cache/@react-pdf-svg-npm-1.1.0-5a97c07518-23c3052ee0.zip new file mode 100644 index 00000000000..9d28ade8ed7 Binary files /dev/null and b/.yarn/cache/@react-pdf-svg-npm-1.1.0-5a97c07518-23c3052ee0.zip differ diff --git a/.yarn/cache/@react-pdf-textkit-npm-6.0.0-ad8481d0d8-5bc087ad2d.zip b/.yarn/cache/@react-pdf-textkit-npm-6.0.0-ad8481d0d8-5bc087ad2d.zip deleted file mode 100644 index e72524cf5e0..00000000000 Binary files a/.yarn/cache/@react-pdf-textkit-npm-6.0.0-ad8481d0d8-5bc087ad2d.zip and /dev/null differ diff --git a/.yarn/cache/@react-pdf-textkit-npm-6.3.0-1e829976be-d95f16dce9.zip b/.yarn/cache/@react-pdf-textkit-npm-6.3.0-1e829976be-d95f16dce9.zip new file mode 100644 index 00000000000..3df5dcb4400 Binary files /dev/null and b/.yarn/cache/@react-pdf-textkit-npm-6.3.0-1e829976be-d95f16dce9.zip differ diff --git a/.yarn/cache/@react-pdf-types-npm-2.11.1-8af15ddcd5-54ede09415.zip b/.yarn/cache/@react-pdf-types-npm-2.11.1-8af15ddcd5-54ede09415.zip new file mode 100644 index 00000000000..6ae1ecb4448 Binary files /dev/null and b/.yarn/cache/@react-pdf-types-npm-2.11.1-8af15ddcd5-54ede09415.zip differ diff --git a/.yarn/cache/@react-pdf-types-npm-2.9.1-67f97a020a-99b8dbc64e.zip b/.yarn/cache/@react-pdf-types-npm-2.9.1-67f97a020a-99b8dbc64e.zip deleted file mode 100644 index 052fe677edd..00000000000 Binary files a/.yarn/cache/@react-pdf-types-npm-2.9.1-67f97a020a-99b8dbc64e.zip and /dev/null differ diff --git a/.yarn/cache/color-name-npm-2.1.0-0d5dd61305-eb014f71d8.zip b/.yarn/cache/color-name-npm-2.1.0-0d5dd61305-eb014f71d8.zip new file mode 100644 index 00000000000..4cce5c7287a Binary files /dev/null and b/.yarn/cache/color-name-npm-2.1.0-0d5dd61305-eb014f71d8.zip differ diff --git a/.yarn/cache/color-string-npm-2.1.4-e5adac6a35-f9caa29d52.zip b/.yarn/cache/color-string-npm-2.1.4-e5adac6a35-f9caa29d52.zip new file mode 100644 index 00000000000..f46ba983da5 Binary files /dev/null and b/.yarn/cache/color-string-npm-2.1.4-e5adac6a35-f9caa29d52.zip differ diff --git a/.yarn/cache/crypto-js-npm-4.2.0-d6f7744e63-f051666dbc.zip b/.yarn/cache/crypto-js-npm-4.2.0-d6f7744e63-f051666dbc.zip deleted file mode 100644 index 87d2ed49842..00000000000 Binary files a/.yarn/cache/crypto-js-npm-4.2.0-d6f7744e63-f051666dbc.zip and /dev/null differ diff --git a/.yarn/cache/fflate-npm-0.8.3-35acaff861-a2a417e8fb.zip b/.yarn/cache/fflate-npm-0.8.3-35acaff861-a2a417e8fb.zip new file mode 100644 index 00000000000..1bc0a8e5d53 Binary files /dev/null and b/.yarn/cache/fflate-npm-0.8.3-35acaff861-a2a417e8fb.zip differ diff --git a/.yarn/cache/js-md5-npm-0.8.3-c353e27117-b8578232d8.zip b/.yarn/cache/js-md5-npm-0.8.3-c353e27117-b8578232d8.zip new file mode 100644 index 00000000000..d4542e3b0c4 Binary files /dev/null and b/.yarn/cache/js-md5-npm-0.8.3-c353e27117-b8578232d8.zip differ diff --git a/.yarn/cache/png-js-npm-2.0.0-2a60ae96e2-a880131c0c.zip b/.yarn/cache/png-js-npm-2.0.0-2a60ae96e2-a880131c0c.zip new file mode 100644 index 00000000000..c8a611713ec Binary files /dev/null and b/.yarn/cache/png-js-npm-2.0.0-2a60ae96e2-a880131c0c.zip differ diff --git a/packages/clipper/CHANGELOG.md b/packages/clipper/CHANGELOG.md index f77454745d4..80049b45b0b 100644 --- a/packages/clipper/CHANGELOG.md +++ b/packages/clipper/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.586](https://github.com/standardnotes/app/compare/@standardnotes/clipper@1.1.585...@standardnotes/clipper@1.1.586) (2026-04-29) + +**Note:** Version bump only for package @standardnotes/clipper + ## [1.1.585](https://github.com/standardnotes/app/compare/@standardnotes/clipper@1.1.584...@standardnotes/clipper@1.1.585) (2026-04-24) **Note:** Version bump only for package @standardnotes/clipper diff --git a/packages/clipper/package.json b/packages/clipper/package.json index 8a7cbe7fdcd..3a573cfb9fb 100644 --- a/packages/clipper/package.json +++ b/packages/clipper/package.json @@ -1,7 +1,7 @@ { "name": "@standardnotes/clipper", "description": "Web clipper browser extension for Standard Notes", - "version": "1.1.585", + "version": "1.1.586", "private": true, "scripts": { "build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js", diff --git a/packages/desktop/CHANGELOG.md b/packages/desktop/CHANGELOG.md index dcce96984d9..626e2d00470 100644 --- a/packages/desktop/CHANGELOG.md +++ b/packages/desktop/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.110.191](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.201.26...@standardnotes/desktop@3.110.191) (2026-04-29) + +**Note:** Version bump only for package @standardnotes/desktop + ## [3.110.190](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.201.25...@standardnotes/desktop@3.110.190) (2026-04-24) **Note:** Version bump only for package @standardnotes/desktop diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 73778c9d447..ac42225e77b 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@standardnotes/desktop", "main": "./app/dist/index.js", - "version": "3.110.190", + "version": "3.110.191", "license": "AGPL-3.0", "author": "Standard Notes.", "private": true, diff --git a/packages/mobile/CHANGELOG.md b/packages/mobile/CHANGELOG.md index 3fb94240a8b..0fdb1353e9e 100644 --- a/packages/mobile/CHANGELOG.md +++ b/packages/mobile/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.58.253](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.58.252...@standardnotes/mobile@3.58.253) (2026-04-29) + +**Note:** Version bump only for package @standardnotes/mobile + ## [3.58.252](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.58.251...@standardnotes/mobile@3.58.252) (2026-04-24) **Note:** Version bump only for package @standardnotes/mobile diff --git a/packages/mobile/package.json b/packages/mobile/package.json index d1747c244bc..ba17ddab6ad 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -1,6 +1,6 @@ { "name": "@standardnotes/mobile", - "version": "3.58.252", + "version": "3.58.253", "author": "Standard Notes.", "private": true, "license": "AGPL-3.0", diff --git a/packages/releases/CHANGELOG.md b/packages/releases/CHANGELOG.md index b11ec4482ef..c14caa0845b 100644 --- a/packages/releases/CHANGELOG.md +++ b/packages/releases/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.893](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.892...@standardnotes/releases@1.4.893) (2026-04-29) + +**Note:** Version bump only for package @standardnotes/releases + ## [1.4.892](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.891...@standardnotes/releases@1.4.892) (2026-04-24) **Note:** Version bump only for package @standardnotes/releases diff --git a/packages/releases/package.json b/packages/releases/package.json index 0381574aba0..90b9866a897 100644 --- a/packages/releases/package.json +++ b/packages/releases/package.json @@ -1,6 +1,6 @@ { "name": "@standardnotes/releases", - "version": "1.4.892", + "version": "1.4.893", "repository": { "type": "git", "url": "https://github.com/standardnotes/app", diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index f1cd13cad03..8cc8a7939b0 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.201.27](https://github.com/standardnotes/app/compare/@standardnotes/web@3.201.26...@standardnotes/web@3.201.27) (2026-04-29) + +### Bug Fixes + +* Fixes Super search highlights styling ([#3009](https://github.com/standardnotes/app/issues/3009)) ([a39bb82](https://github.com/standardnotes/app/commit/a39bb824f7b6d4f761abb27df9b7c7ba4818ce14)) +* Switches back to note list on mobile when active note is deleted from a different device ([#3008](https://github.com/standardnotes/app/issues/3008)) ([f4a9481](https://github.com/standardnotes/app/commit/f4a94811848ea19550703d5dcd2b446091bf9536)) + ## [3.201.26](https://github.com/standardnotes/app/compare/@standardnotes/web@3.201.25...@standardnotes/web@3.201.26) (2026-04-24) ### Bug Fixes diff --git a/packages/web/CHANGELOG.md.json b/packages/web/CHANGELOG.md.json index bde1d388db7..fc149e54e11 100644 --- a/packages/web/CHANGELOG.md.json +++ b/packages/web/CHANGELOG.md.json @@ -1,5 +1,21 @@ { "versions": [ + { + "version": "3.201.27", + "title": "[3.201.27](https://github.com/standardnotes/app/compare/@standardnotes/web@3.201.26...@standardnotes/web@3.201.27) (2026-04-29)", + "date": null, + "body": "### Bug Fixes\n\n* Fixes Super search highlights styling ([#3009](https://github.com/standardnotes/app/issues/3009)) ([a39bb82](https://github.com/standardnotes/app/commit/a39bb824f7b6d4f761abb27df9b7c7ba4818ce14))\n* Switches back to note list on mobile when active note is deleted from a different device ([#3008](https://github.com/standardnotes/app/issues/3008)) ([f4a9481](https://github.com/standardnotes/app/commit/f4a94811848ea19550703d5dcd2b446091bf9536))", + "parsed": { + "_": [ + "Fixes Super search highlights styling (#3009) (a39bb82)", + "Switches back to note list on mobile when active note is deleted from a different device (#3008) (f4a9481)" + ], + "Bug Fixes": [ + "Fixes Super search highlights styling (#3009) (a39bb82)", + "Switches back to note list on mobile when active note is deleted from a different device (#3008) (f4a9481)" + ] + } + }, { "version": "3.201.26", "title": "[3.201.26](https://github.com/standardnotes/app/compare/@standardnotes/web@3.201.25...@standardnotes/web@3.201.26) (2026-04-24)", diff --git a/packages/web/package.json b/packages/web/package.json index e4f76d0ad49..6d438868eda 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@standardnotes/web", - "version": "3.201.26", + "version": "3.201.27", "license": "AGPL-3.0", "main": "dist/app.js", "author": "Standard Notes", @@ -117,7 +117,7 @@ "@lexical/rich-text": "0.43.0", "@lexical/utils": "0.43.0", "@radix-ui/react-slot": "^1.0.1", - "@react-pdf/renderer": "^4.3.0", + "@react-pdf/renderer": "^4.4.1", "comlink": "^4.4.1", "fast-diff": "^1.3.0", "lexical": "0.43.0", diff --git a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/CodeHighlightColors.ts b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/CodeHighlightColors.ts new file mode 100644 index 00000000000..6db3ea222e0 --- /dev/null +++ b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/CodeHighlightColors.ts @@ -0,0 +1,33 @@ +import BlocksEditorTheme from '../../Theme/Theme' + +const TOKEN_CLASS_COLORS: Record = { + Lexical__tokenComment: 'slategray', + Lexical__tokenPunctuation: '#999', + Lexical__tokenProperty: '#905', + Lexical__tokenSelector: '#690', + Lexical__tokenOperator: '#9a6e3a', + Lexical__tokenAttr: '#07a', + Lexical__tokenVariable: '#e90', + Lexical__tokenFunction: '#dd4a68', +} + +const HIGHLIGHT_TYPE_TO_COLOR: Record = {} + +const codeHighlightTheme = BlocksEditorTheme.codeHighlight + +if (codeHighlightTheme) { + for (const [highlightType, tokenClass] of Object.entries(codeHighlightTheme)) { + const color = TOKEN_CLASS_COLORS[tokenClass] + if (color) { + HIGHLIGHT_TYPE_TO_COLOR[highlightType] = color + } + } +} + +export const getPDFColorForCodeHighlight = (highlightType: string | null | undefined): string | undefined => { + if (!highlightType) { + return undefined + } + + return HIGHLIGHT_TYPE_TO_COLOR[highlightType] +} diff --git a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx index 3bc69be0dd7..375f574c8c8 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFExport.tsx @@ -4,17 +4,19 @@ import { $isElementNode, $isParagraphNode, $isLineBreakNode, + $isTabNode, $isTextNode, LexicalEditor, LexicalNode, ElementNode, + TextNode, } from 'lexical' import { $isLinkNode } from '@lexical/link' import { $isHeadingNode, type HeadingNode, $isQuoteNode } from '@lexical/rich-text' import { $isListNode, $isListItemNode, ListType } from '@lexical/list' import { $isHorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode' import { $isTableNode, $isTableRowNode, $isTableCellNode } from '@lexical/table' -import { $isCodeNode } from '@lexical/code' +import { $isCodeHighlightNode, $isCodeNode } from '@lexical/code' import { $isInlineFileNode } from '../../../Plugins/InlineFilePlugin/InlineFileNode' import { $isRemoteImageNode } from '../../../Plugins/RemoteImagePlugin/RemoteImageNode' import { $isCollapsibleContainerNode } from '../../../Plugins/CollapsiblePlugin/CollapsibleContainerNode' @@ -32,20 +34,24 @@ import { MONOSPACE_FONT_FAMILY, getFontFamiliesFromLexicalNode, } from './FontConfig' +import { getPDFColorForCodeHighlight } from './CodeHighlightColors' +import { + PDF_BASE_FONT_SIZE, + PDF_BLOCK_GAP, + PDF_CODE_BLOCK_FONT_SIZE, + PDF_CODE_TAB_SIZE, + PDF_LINE_HEIGHT_MULTIPLIER, + PDF_LIST_ITEM_GAP, + PDF_PAGE_PADDING, + PDF_QUOTE_INNER_GAP, +} from './PDFLayoutConstants' const PDF_SUPERSUBSCRIPT_FONT_SIZE = 9 const PDF_HEADING_SUPERSUBSCRIPT_SCALE = 0.75 const styles = StyleSheet.create({ - page: { - paddingVertical: 35, - paddingHorizontal: 35, - lineHeight: 1.5, - fontSize: 12, - gap: 14, - }, block: { - gap: 14, + gap: PDF_BLOCK_GAP, }, wrap: { flexWrap: 'wrap', @@ -75,7 +81,7 @@ const styles = StyleSheet.create({ borderLeftColor: '#72767e', paddingLeft: 12, paddingVertical: 4, - gap: 4, + gap: PDF_QUOTE_INNER_GAP, }, }) @@ -138,6 +144,7 @@ const getListItemNode = ({ type: 'Text', style: { flex: 1, + lineHeight: PDF_BASE_FONT_SIZE * PDF_LINE_HEIGHT_MULTIPLIER, }, children, }, @@ -145,13 +152,121 @@ const getListItemNode = ({ } } -const MinimumHeadingFontSize = 13 -const MaxHeadingLevel = 6 +const HEADING_FONT_SIZES = [1.625, 1.375, 1.125, 0.875, 0.625, 0.375] + const getFontSizeForHeading = (heading: HeadingNode) => { const level = parseInt(heading.getTag().slice(1)) - const multiplier = (MaxHeadingLevel - level) * 2 + return (HEADING_FONT_SIZES[level - 1] ?? 1) * PDF_BASE_FONT_SIZE +} + +const getPDFTextContent = (node: TextNode, isCodeNodeText: boolean): string => { + if ($isTabNode(node) && isCodeNodeText) { + return ' '.repeat(PDF_CODE_TAB_SIZE) + } + + return node.getTextContent() +} + +const getPDFTextFontFamily = ( + node: TextNode, + fontFamilies: FontFamily[], + useCustomFonts: boolean, + isInlineCode: boolean, + isCodeNodeText: boolean, +): FontFamily | FontFamily[] => { + if (isCodeNodeText || isInlineCode) { + return MONOSPACE_FONT_FAMILY + } + + if (useCustomFonts) { + const nodeFontFamilies = getFontFamiliesFromLexicalNode(node) + fontFamilies.push(...nodeFontFamilies) + return [...nodeFontFamilies, FALLBACK_FONT_FAMILY] + } + + return FALLBACK_FONT_FAMILY +} + +const getPDFTextFontSize = ( + isInlineCode: boolean, + isCodeNodeText: boolean, + isSuperscript: boolean, + isSubscript: boolean, + headingFontSize: number | undefined, +): number | undefined => { + const baseFontSize = isInlineCode || isCodeNodeText ? PDF_CODE_BLOCK_FONT_SIZE : undefined + + if (isSuperscript || isSubscript) { + if (headingFontSize) { + return Math.max(PDF_SUPERSUBSCRIPT_FONT_SIZE, Math.round(headingFontSize * PDF_HEADING_SUPERSUBSCRIPT_SCALE)) + } + return PDF_SUPERSUBSCRIPT_FONT_SIZE + } + + return baseFontSize +} + +const getPDFTextLineHeight = (isHeading: boolean, headingFontSize: number | undefined): string => { + const size = + isHeading && headingFontSize + ? headingFontSize * PDF_LINE_HEIGHT_MULTIPLIER + : PDF_BASE_FONT_SIZE * PDF_LINE_HEIGHT_MULTIPLIER - return MinimumHeadingFontSize + multiplier + return `${size}px` +} + +const getPDFTextColor = (node: TextNode, parent: LexicalNode | null): string | undefined => { + if ($isCodeHighlightNode(node) && $isCodeNode(parent)) { + return getPDFColorForCodeHighlight(node.getHighlightType()) + } + + return undefined +} + +const getPDFTextDecoration = (node: TextNode): 'underline' | 'line-through' | undefined => { + if (node.hasFormat('underline')) { + return 'underline' + } + if (node.hasFormat('strikethrough')) { + return 'line-through' + } + return undefined +} + +const isInsideTableHeaderCell = (node: LexicalNode): boolean => { + return node.getParents().some((parent) => { + return $isTableCellNode(parent) && parent.hasHeader() + }) +} + +const getPDFTextDataNodeFromLexicalTextNode = ( + node: TextNode, + parent: LexicalNode | null, + fontFamilies: FontFamily[], + useCustomFonts: boolean, +): PDFDataNode => { + const isInlineCode = node.hasFormat('code') + const isCodeNodeText = $isCodeNode(parent) + const isHeading = $isHeadingNode(parent) + const isSuperscript = node.hasFormat('superscript') + const isSubscript = node.hasFormat('subscript') + const headingFontSize = isHeading ? getFontSizeForHeading(parent) : undefined + + return { + type: 'Text', + children: getPDFTextContent(node, isCodeNodeText), + style: { + fontFamily: getPDFTextFontFamily(node, fontFamilies, useCustomFonts, isInlineCode, isCodeNodeText), + fontWeight: node.hasFormat('bold') || isHeading || isInsideTableHeaderCell(node) ? 'bold' : 'normal', + fontStyle: node.hasFormat('italic') ? 'italic' : 'normal', + textDecoration: getPDFTextDecoration(node), + backgroundColor: isInlineCode ? '#f1f1f1' : node.hasFormat('highlight') ? 'rgb(255,255,0)' : undefined, + color: getPDFTextColor(node, parent), + fontSize: getPDFTextFontSize(isInlineCode, isCodeNodeText, isSuperscript, isSubscript, headingFontSize), + verticalAlign: isSuperscript ? 'super' : isSubscript ? 'sub' : undefined, + lineHeight: getPDFTextLineHeight(isHeading, headingFontSize), + }, + } } const getNodeTextAlignment = (node: ElementNode) => { @@ -183,6 +298,11 @@ const getNodeDirection = (node: ElementNode) => { return direction ?? 'ltr' } +const getPDFVerticalSpacer = (height: number = PDF_BASE_FONT_SIZE * PDF_LINE_HEIGHT_MULTIPLIER): PDFDataNode => ({ + type: 'View', + style: { height }, +}) + const getPDFDataNodeFromLexicalNode = ( node: LexicalNode, fontFamilies: FontFamily[], @@ -198,53 +318,7 @@ const getPDFDataNodeFromLexicalNode = ( } if ($isTextNode(node)) { - const isInlineCode = node.hasFormat('code') - const isCodeNodeText = $isCodeNode(parent) - const isBold = node.hasFormat('bold') - const isItalic = node.hasFormat('italic') - const isHighlight = node.hasFormat('highlight') - const isSuperscript = node.hasFormat('superscript') - const isSubscript = node.hasFormat('subscript') - let fontFamily: FontFamily[] | FontFamily = FALLBACK_FONT_FAMILY - - if (isInlineCode && isCodeNodeText) { - fontFamily = MONOSPACE_FONT_FAMILY - } else { - if (useCustomFonts) { - const nodeFontFamilies = getFontFamiliesFromLexicalNode(node) - fontFamily = [...nodeFontFamilies, FALLBACK_FONT_FAMILY] - fontFamilies.push(...nodeFontFamilies) - } - } - - const baseFontSize = isInlineCode || isCodeNodeText ? 11 : undefined - const headingFontSize = $isHeadingNode(parent) ? getFontSizeForHeading(parent) : undefined - const fontSize = - isSuperscript || isSubscript - ? headingFontSize - ? Math.max(PDF_SUPERSUBSCRIPT_FONT_SIZE, Math.round(headingFontSize * PDF_HEADING_SUPERSUBSCRIPT_SCALE)) - : PDF_SUPERSUBSCRIPT_FONT_SIZE - : baseFontSize - - return { - type: 'Text', - children: node.getTextContent(), - style: { - fontFamily, - fontWeight: isBold ? 'bold' : 'normal', - fontStyle: isItalic ? 'italic' : 'normal', - direction: $isElementNode(parent) ? getNodeDirection(parent) : 'ltr', - textDecoration: node.hasFormat('underline') - ? 'underline' - : node.hasFormat('strikethrough') - ? 'line-through' - : undefined, - backgroundColor: isInlineCode ? '#f1f1f1' : isHighlight ? 'rgb(255,255,0)' : undefined, - fontSize, - textAlign: $isElementNode(parent) ? getNodeTextAlignment(parent) : 'left', - verticalAlign: isSuperscript ? 'super' : isSubscript ? 'sub' : undefined, - }, - } + return getPDFTextDataNodeFromLexicalTextNode(node, parent, fontFamilies, useCustomFonts) } if ($isCodeNode(node)) { @@ -270,16 +344,20 @@ const getPDFDataNodeFromLexicalNode = ( backgroundColor: 'rgba(0,0,0,0.05)', padding: 12, borderRadius: 6, - fontFamily: 'Courier', + fontFamily: MONOSPACE_FONT_FAMILY, + fontSize: PDF_CODE_BLOCK_FONT_SIZE, }, ], children: lines.map((line) => { return { type: 'View', style: [styles.row, styles.wrap], - children: line.map((child) => { - return getPDFDataNodeFromLexicalNode(child, fontFamilies, useCustomFonts) - }), + children: + line.length === 0 + ? [getPDFVerticalSpacer(PDF_CODE_BLOCK_FONT_SIZE * PDF_LINE_HEIGHT_MULTIPLIER)] + : line + .map((child) => getPDFDataNodeFromLexicalNode(child, fontFamilies, useCustomFonts)) + .filter((child): child is PDFDataNode => child != null), } }), } @@ -356,7 +434,7 @@ const getPDFDataNodeFromLexicalNode = ( style: [ styles.column, { - gap: 7, + gap: PDF_LIST_ITEM_GAP, }, ], children, @@ -392,7 +470,7 @@ const getPDFDataNodeFromLexicalNode = ( } if ($isParagraphNode(node) && node.getTextContent().length === 0) { - return null + return getPDFVerticalSpacer() } if ($isTableCellNode(node)) { @@ -403,7 +481,8 @@ const getPDFDataNodeFromLexicalNode = ( borderColor: '#e3e3e3', borderWidth: 1, flex: 1, - padding: 2, + paddingHorizontal: 8, + paddingVertical: 6, }, children, } @@ -453,7 +532,8 @@ const getPDFDataNodeFromLexicalNode = ( { type: 'Text', style: { - lineHeight: $isHeadingNode(node) ? 1 : 1.5, + textAlign: getNodeTextAlignment(node), + direction: getNodeDirection(node), }, children, }, @@ -476,6 +556,95 @@ const getPDFDataNodesFromLexicalNodes = ( return nodes.map((node) => getPDFDataNodeFromLexicalNode(node, fontFamilies, useCustomFonts)) } +/** + * Page widths in points (72dpi) sourced from PAGE_SIZES in + * @react-pdf/layout/lib/index.js — verify against that file when upgrading the library. + */ +const PDF_PAGE_WIDTHS_PT: Record = { + A3: 841.89, + A4: 595.28, + LETTER: 612, + LEGAL: 612, + TABLOID: 792, +} + +const getPDFContentWidth = (pageSize: PrefValue[PrefKey.SuperNoteExportPDFPageSize]): number => { + return PDF_PAGE_WIDTHS_PT[pageSize] - 2 * PDF_PAGE_PADDING +} + +type PDFImageNaturalDimensions = { + width: number + height: number +} + +const walkPDFDataNodes = (nodes: PDFDataNode[], visitor: (node: NonNullable) => void): void => { + const visit = (node: PDFDataNode) => { + if (!node) { + return + } + visitor(node) + if (Array.isArray(node.children)) { + node.children.forEach(visit) + } + } + nodes.forEach(visit) +} + +const collectPDFImageSources = (nodes: PDFDataNode[]): string[] => { + const sources = new Set() + walkPDFDataNodes(nodes, (node) => { + if (node.type === 'Image' && typeof node.src === 'string') { + sources.add(node.src) + } + }) + return [...sources] +} + +const loadPDFImageDimensions = (src: string): Promise => { + return new Promise((resolve) => { + const image = new window.Image() + image.onload = () => { + if (image.naturalWidth <= 0 || image.naturalHeight <= 0) { + resolve(null) + return + } + resolve({ width: image.naturalWidth, height: image.naturalHeight }) + } + image.onerror = () => resolve(null) + image.src = src + }) +} + +const loadPDFImageDimensionsMap = async (sources: string[]): Promise> => { + const entries = await Promise.all(sources.map(async (src) => [src, await loadPDFImageDimensions(src)] as const)) + + const map = new Map() + for (const [src, dimensions] of entries) { + if (dimensions) { + map.set(src, dimensions) + } + } + return map +} + +const patchPDFImageStyles = ( + nodes: PDFDataNode[], + contentWidth: number, + imageDimensions: Map, +): void => { + walkPDFDataNodes(nodes, (node) => { + if (node.type === 'Image' && typeof node.src === 'string') { + const natural = imageDimensions.get(node.src) + if (natural && natural.width > 0 && natural.height > 0) { + const displayWidth = Math.min(natural.width, contentWidth) + node.style = { width: displayWidth, height: displayWidth * (natural.height / natural.width) } + } else { + node.style = { width: contentWidth } + } + } + }) +} + const pdfWorker = new PDFWorker() const PDFWorkerComlink = wrap(pdfWorker) @@ -499,10 +668,15 @@ export function $generatePDFFromNodes(editor: LexicalEditor, pageSize: PrefValue const root = $getRoot() const nodes = root.getChildren() const fontFamilies: FontFamily[] = [] - + const contentWidth = getPDFContentWidth(pageSize) const pdfDataNodes = getPDFDataNodesFromLexicalNodes(nodes, fontFamilies, useCustomFonts) + const imageSources = collectPDFImageSources(pdfDataNodes) - void PDFWorkerComlink.renderPDF(pdfDataNodes, pageSize, fontFamilies, useCustomFonts) + void loadPDFImageDimensionsMap(imageSources) + .then((imageDimensions) => { + patchPDFImageStyles(pdfDataNodes, contentWidth, imageDimensions) + return PDFWorkerComlink.renderPDF(pdfDataNodes, pageSize, fontFamilies, useCustomFonts) + }) .then((blob) => { const url = URL.createObjectURL(blob) resolve(url) diff --git a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFLayoutConstants.ts b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFLayoutConstants.ts new file mode 100644 index 00000000000..3b46d02a2e7 --- /dev/null +++ b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFLayoutConstants.ts @@ -0,0 +1,8 @@ +export const PDF_BASE_FONT_SIZE = 12 +export const PDF_LINE_HEIGHT_MULTIPLIER = 1.5 +export const PDF_CODE_BLOCK_FONT_SIZE = 11 +export const PDF_CODE_TAB_SIZE = 2 +export const PDF_BLOCK_GAP = 4 +export const PDF_LIST_ITEM_GAP = 0 +export const PDF_QUOTE_INNER_GAP = 4 +export const PDF_PAGE_PADDING = 35 diff --git a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFWorker.worker.tsx b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFWorker.worker.tsx index f35b974b878..dd4f0af59c9 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFWorker.worker.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Lexical/Utils/PDFExport/PDFWorker.worker.tsx @@ -18,6 +18,7 @@ import { } from '@react-pdf/renderer' import { expose } from 'comlink' import { FontFamily, registerPDFFonts } from './FontConfig' +import { PDF_BASE_FONT_SIZE, PDF_BLOCK_GAP, PDF_PAGE_PADDING } from './PDFLayoutConstants' export type PDFDataNode = | (( @@ -80,11 +81,10 @@ const PDFDocument = ({ nodes, pageSize }: { nodes: PDFDataNode[]; pageSize: Page {nodes.map((node, index) => { diff --git a/yarn.lock b/yarn.lock index 8006fbd3c70..e6b3de8a41b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5307,6 +5307,20 @@ __metadata: languageName: node linkType: hard +"@noble/ciphers@npm:^1.0.0": + version: 1.3.0 + resolution: "@noble/ciphers@npm:1.3.0" + checksum: 19722c35475df9bc78db60d261d0b5ef8a6d722561efc2135453f943eaa421b492195dc666e3e4df2b755bca3739e04f04b9c660198559f5dd05d3cfbf1b9e92 + languageName: node + linkType: hard + +"@noble/hashes@npm:^1.6.0": + version: 1.8.0 + resolution: "@noble/hashes@npm:1.8.0" + checksum: c94e98b941963676feaba62475b1ccfa8341e3f572adbb3b684ee38b658df44100187fa0ef4220da580b13f8d27e87d5492623c8a02ecc61f23fb9960c7918f5 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -6997,171 +7011,174 @@ __metadata: languageName: node linkType: hard -"@react-pdf/fns@npm:3.1.2": - version: 3.1.2 - resolution: "@react-pdf/fns@npm:3.1.2" - checksum: 4e8cdd32f223e4d3682b49a5539b1f9cf0a6b4e035f5e5ff9aa5a0c4235278820cc7f73c085aa696e46d61f22965c4f33ba1dd8335665c3e6e545dd7f4cde185 +"@react-pdf/fns@npm:3.1.3": + version: 3.1.3 + resolution: "@react-pdf/fns@npm:3.1.3" + checksum: 0cd27ef6cde45a4fa45a664fb9ae568ae3b352082cf8fd480a110d1ec857a2d8e9550ee732941ce59fe409cf93889b909c1dbb23200ec4ca95c3cb972a70cb4c languageName: node linkType: hard -"@react-pdf/font@npm:^4.0.3": - version: 4.0.3 - resolution: "@react-pdf/font@npm:4.0.3" +"@react-pdf/font@npm:^4.0.8": + version: 4.0.8 + resolution: "@react-pdf/font@npm:4.0.8" dependencies: - "@react-pdf/pdfkit": ^4.0.4 - "@react-pdf/types": ^2.9.1 + "@react-pdf/pdfkit": ^5.1.1 + "@react-pdf/types": ^2.11.1 fontkit: ^2.0.2 is-url: ^1.2.4 - checksum: 933e451381c6fcc77687318b8b193d0a81280f4f1499357b993853e4be5333d3a25db57a3662bb3548cedb98c990d53e49ea04b0462c193d33cc0480ce6958d6 + checksum: 8343c363ea0c314fe136d67352144bdfde366fd095aaeb6ffe2d09191dd24f67627f81164f932f4fa68cf1a80bb74784610926142504035a6a0800a16285cbb5 languageName: node linkType: hard -"@react-pdf/image@npm:^3.0.3": - version: 3.0.3 - resolution: "@react-pdf/image@npm:3.0.3" +"@react-pdf/image@npm:^3.1.0": + version: 3.1.0 + resolution: "@react-pdf/image@npm:3.1.0" dependencies: - "@react-pdf/png-js": ^3.0.0 + "@react-pdf/svg": ^1.1.0 jay-peg: ^1.1.1 - checksum: 893ebef74d62d9d163af7035401c2bd0c5e43ceb7d6b9cc7e50d3ce2a2e7af7888b98e83e713a655ad6be5b0f246a1ac8a773a679ef30aaaac5b2579f0f8712f + png-js: ^2.0.0 + checksum: 7054b84adad28c8f11575fd5c7d15b5336cbdb6f15cbee83cd338b0ccec5c11e01341ac67188427e098703ace40867c6af4240fdd4aa55897f07a4e3884adfdb languageName: node linkType: hard -"@react-pdf/layout@npm:^4.4.1": - version: 4.4.1 - resolution: "@react-pdf/layout@npm:4.4.1" - dependencies: - "@react-pdf/fns": 3.1.2 - "@react-pdf/image": ^3.0.3 - "@react-pdf/primitives": ^4.1.1 - "@react-pdf/stylesheet": ^6.1.1 - "@react-pdf/textkit": ^6.0.0 - "@react-pdf/types": ^2.9.1 +"@react-pdf/layout@npm:^4.6.1": + version: 4.6.1 + resolution: "@react-pdf/layout@npm:4.6.1" + dependencies: + "@react-pdf/fns": 3.1.3 + "@react-pdf/image": ^3.1.0 + "@react-pdf/primitives": ^4.3.0 + "@react-pdf/stylesheet": ^6.2.1 + "@react-pdf/textkit": ^6.3.0 + "@react-pdf/types": ^2.11.1 emoji-regex-xs: ^1.0.0 queue: ^6.0.1 yoga-layout: ^3.2.1 - checksum: 5d7baa7f92cf569aa795af4b61690e2afa0e584481d983a50edc32462b8a909ad574f67c5ceca89219d74fa2becbfa317a43fd5190eb66b513e05830d0eea56f + checksum: 83ed94e0d03e559dbae958c3d111430bfd0a3071abfd58aca14071566d9462282ee965be4899dee52acf669cda1a9148e1ac594326497d5a4f68aa7b8edb3186 languageName: node linkType: hard -"@react-pdf/pdfkit@npm:^4.0.4": - version: 4.0.4 - resolution: "@react-pdf/pdfkit@npm:4.0.4" +"@react-pdf/pdfkit@npm:^5.1.1": + version: 5.1.1 + resolution: "@react-pdf/pdfkit@npm:5.1.1" dependencies: "@babel/runtime": ^7.20.13 - "@react-pdf/png-js": ^3.0.0 + "@noble/ciphers": ^1.0.0 + "@noble/hashes": ^1.6.0 browserify-zlib: ^0.2.0 - crypto-js: ^4.2.0 fontkit: ^2.0.2 jay-peg: ^1.1.1 + js-md5: ^0.8.3 linebreak: ^1.1.0 + png-js: ^2.0.0 vite-compatible-readable-stream: ^3.6.1 - checksum: 706cf5bc03b21f099c8b56771dba64a91efb2477dab8946ff803f971a8c6979d4d93372f56b09bd53abdc09468c8d623799d96c7f66763ff736a0a96dfaa82c3 - languageName: node - linkType: hard - -"@react-pdf/png-js@npm:^3.0.0": - version: 3.0.0 - resolution: "@react-pdf/png-js@npm:3.0.0" - dependencies: - browserify-zlib: ^0.2.0 - checksum: 90c1612d7576d83eaf3fef9d5714b7fedb8f3e83a9af199763c4d68f73652aecec7d9fa90f185224c412500849f44beb4a4c49828c097e93d2ad42336bb019d1 + checksum: 157af7e7656ca6374fcaa0e618eb2d41acd15d42ad3f626386351c3bf9c6997c4e4ec0fc21218c084c8166e663ed17ab580812c3e02d8f552adf9711ffdb926c languageName: node linkType: hard -"@react-pdf/primitives@npm:^4.1.1": - version: 4.1.1 - resolution: "@react-pdf/primitives@npm:4.1.1" - checksum: adadff1996daeca693aa59844ab613e597fdb674fce9f2c03f52573b593982ef49ff47d861290235861d02462ffbc87b7ed3da0d71af0d61c9226ce61b94ada8 +"@react-pdf/primitives@npm:^4.3.0": + version: 4.3.0 + resolution: "@react-pdf/primitives@npm:4.3.0" + checksum: 391f48e09a9b13eb72f763398a792b59484637023afe1e19fba7b4bafde339af87b0d9142d50c0dcf980a81851f92f772fd27ce678af08c16552524da79e4f1b languageName: node linkType: hard -"@react-pdf/reconciler@npm:^1.1.4": - version: 1.1.4 - resolution: "@react-pdf/reconciler@npm:1.1.4" +"@react-pdf/reconciler@npm:^2.0.0": + version: 2.0.0 + resolution: "@react-pdf/reconciler@npm:2.0.0" dependencies: object-assign: ^4.1.1 scheduler: 0.25.0-rc-603e6108-20241029 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - checksum: d920898a1c6bee70fb257aad1d53c062fedd9d2ad6ca6c63902bfc03c71713f4ab01a18cbfba55724ab7ca74985a2bc4774c51f690471182a7622a8a48056054 + checksum: 249df947f0dad304d43a69699419768db94422197004d0af66857630522dbd35041f4929726bfe1b46b9a28c042f8adb8fa6cb4f62691e502ada5ecc7a3af420 languageName: node linkType: hard -"@react-pdf/render@npm:^4.3.1": - version: 4.3.1 - resolution: "@react-pdf/render@npm:4.3.1" +"@react-pdf/render@npm:^4.5.1": + version: 4.5.1 + resolution: "@react-pdf/render@npm:4.5.1" dependencies: "@babel/runtime": ^7.20.13 - "@react-pdf/fns": 3.1.2 - "@react-pdf/primitives": ^4.1.1 - "@react-pdf/textkit": ^6.0.0 - "@react-pdf/types": ^2.9.1 + "@react-pdf/fns": 3.1.3 + "@react-pdf/primitives": ^4.3.0 + "@react-pdf/textkit": ^6.3.0 + "@react-pdf/types": ^2.11.1 abs-svg-path: ^0.1.1 - color-string: ^1.9.1 + color-string: ^2.1.4 normalize-svg-path: ^1.1.0 parse-svg-path: ^0.1.2 svg-arc-to-cubic-bezier: ^3.2.0 - checksum: 2dfea722c1251030868e5c0ac6fd83179d01027f1cea3848cc637c3f98aa6144eb0672211cdce6a13bd89d8b8dbeaf59b9d3d85ae91abe19ca615e1bfb8e5fcb + checksum: 2ece33377403f4bd5d1d1f7fe8030bd65a31a89400354622b01f7eb1fb505a67fb23039aa33b43963fa7e32f53c933a142a7aaf5aa64b51c16f30d9369051efb languageName: node linkType: hard -"@react-pdf/renderer@npm:^4.3.0": - version: 4.3.1 - resolution: "@react-pdf/renderer@npm:4.3.1" +"@react-pdf/renderer@npm:^4.4.1": + version: 4.5.1 + resolution: "@react-pdf/renderer@npm:4.5.1" dependencies: "@babel/runtime": ^7.20.13 - "@react-pdf/fns": 3.1.2 - "@react-pdf/font": ^4.0.3 - "@react-pdf/layout": ^4.4.1 - "@react-pdf/pdfkit": ^4.0.4 - "@react-pdf/primitives": ^4.1.1 - "@react-pdf/reconciler": ^1.1.4 - "@react-pdf/render": ^4.3.1 - "@react-pdf/types": ^2.9.1 + "@react-pdf/fns": 3.1.3 + "@react-pdf/font": ^4.0.8 + "@react-pdf/layout": ^4.6.1 + "@react-pdf/pdfkit": ^5.1.1 + "@react-pdf/primitives": ^4.3.0 + "@react-pdf/reconciler": ^2.0.0 + "@react-pdf/render": ^4.5.1 + "@react-pdf/types": ^2.11.1 events: ^3.3.0 object-assign: ^4.1.1 prop-types: ^15.6.2 queue: ^6.0.1 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - checksum: 0e9e2d9b30fd238f9bebe3d2409496b6ea40c45f9960f7f72efd21cde9d8eda7fe835eeca0faf30511abc66cc62c8862f3114642901b1bce92fde89bc19d8516 + checksum: 55046bcba438e935210f9eb0dc3bd4d9afe9bcefc39a423de0bea2f7c79965f40c3fb78b96e729378725cc45c36c813f9772ed75fd446f898a7e06d9ddee494a languageName: node linkType: hard -"@react-pdf/stylesheet@npm:^6.1.1": - version: 6.1.1 - resolution: "@react-pdf/stylesheet@npm:6.1.1" +"@react-pdf/stylesheet@npm:^6.2.1": + version: 6.2.1 + resolution: "@react-pdf/stylesheet@npm:6.2.1" dependencies: - "@react-pdf/fns": 3.1.2 - "@react-pdf/types": ^2.9.1 - color-string: ^1.9.1 + "@react-pdf/fns": 3.1.3 + "@react-pdf/types": ^2.11.1 + color-string: ^2.1.4 hsl-to-hex: ^1.0.0 media-engine: ^1.0.3 postcss-value-parser: ^4.1.0 - checksum: 129d5e01eccd1dcde053d4fdae892a19999c4b3980b030d3356d0305ca40de587af08ba2268bc9beec09863743e249eacec92ecd01942629d9d281aaf2e205f2 + checksum: b5fdedf2902b2cbf9c9a1a3c3329fb71e10a73bcaf32642e3b3cdae27c92e74d1610f48a77b4bd30e224ded741b15d2448dea312bbdf6e255cb4a0562780d553 languageName: node linkType: hard -"@react-pdf/textkit@npm:^6.0.0": - version: 6.0.0 - resolution: "@react-pdf/textkit@npm:6.0.0" +"@react-pdf/svg@npm:^1.1.0": + version: 1.1.0 + resolution: "@react-pdf/svg@npm:1.1.0" + dependencies: + "@react-pdf/primitives": ^4.3.0 + checksum: 23c3052ee057affa373d212d84e6478dbced19a57892d575009619359661579335b69c137d2339e3960c678d69fbacdbcd1fb1925227895af0a6d3bb8a9261e6 + languageName: node + linkType: hard + +"@react-pdf/textkit@npm:^6.3.0": + version: 6.3.0 + resolution: "@react-pdf/textkit@npm:6.3.0" dependencies: - "@react-pdf/fns": 3.1.2 + "@react-pdf/fns": 3.1.3 bidi-js: ^1.0.2 hyphen: ^1.6.4 unicode-properties: ^1.4.1 - checksum: 5bc087ad2da60d1c3c3a06f02639adaca3d059f526ee9ec79fc7877ef224813ec2eef8f064b36872b5a6e659c510813abe0d89b6fecc0c014833dd5437dc7ef9 + checksum: d95f16dce9954d95e70837158066cd96723902501002fad942d0070806ea4d77a0457399f9d645272a81732d66bd39bdbefb5c0bd6f5e2fe39a8e358da6cd01d languageName: node linkType: hard -"@react-pdf/types@npm:^2.9.1": - version: 2.9.1 - resolution: "@react-pdf/types@npm:2.9.1" +"@react-pdf/types@npm:^2.11.1": + version: 2.11.1 + resolution: "@react-pdf/types@npm:2.11.1" dependencies: - "@react-pdf/font": ^4.0.3 - "@react-pdf/primitives": ^4.1.1 - "@react-pdf/stylesheet": ^6.1.1 - checksum: 99b8dbc64ecc69115af2bb17e06d77c61639cb8f01b305dfbe05c57751cceae7b2e0b7a1b3c9ac6cc478ccb61a46d58b7b407d0408fe5025365c2a7dec626068 + "@react-pdf/font": ^4.0.8 + "@react-pdf/primitives": ^4.3.0 + "@react-pdf/stylesheet": ^6.2.1 + checksum: 54ede0941500a923d45a02473901d1a843d9c4e2cad13942268d48fd5376e2f6ceabd8ba09657504e32373cb23fd6321fec8c072a3cae552cf7f6468854d0e98 languageName: node linkType: hard @@ -9188,7 +9205,7 @@ __metadata: "@lexical/utils": 0.43.0 "@pmmmwh/react-refresh-webpack-plugin": ^0.5.10 "@radix-ui/react-slot": ^1.0.1 - "@react-pdf/renderer": ^4.3.0 + "@react-pdf/renderer": ^4.4.1 "@simplewebauthn/browser": ^8.0.2 "@standardnotes/authenticator": ^2.4.12 "@standardnotes/autobiography-theme": ^1.2.7 @@ -13459,7 +13476,14 @@ __metadata: languageName: node linkType: hard -"color-string@npm:^1.6.0, color-string@npm:^1.9.1": +"color-name@npm:^2.0.0": + version: 2.1.0 + resolution: "color-name@npm:2.1.0" + checksum: eb014f71d87408e318e95d3f554f188370d354ba8e0ffa4341d0fd19de391bfe2bc96e563d4f6614644d676bc24f475560dffee3fe310c2d6865d007410a9a2b + languageName: node + linkType: hard + +"color-string@npm:^1.6.0": version: 1.9.1 resolution: "color-string@npm:1.9.1" dependencies: @@ -13469,6 +13493,15 @@ __metadata: languageName: node linkType: hard +"color-string@npm:^2.1.4": + version: 2.1.4 + resolution: "color-string@npm:2.1.4" + dependencies: + color-name: ^2.0.0 + checksum: f9caa29d529c549febeec813fcc0ecb184ff3dee92cec78f1fd3dfe2c4168fc1b74442efc40e34d2d677470967f570234d11086c3b137d6f9958a8fe12587fde + languageName: node + linkType: hard + "color-support@npm:^1.1.2, color-support@npm:^1.1.3": version: 1.1.3 resolution: "color-support@npm:1.1.3" @@ -14188,13 +14221,6 @@ __metadata: languageName: node linkType: hard -"crypto-js@npm:^4.2.0": - version: 4.2.0 - resolution: "crypto-js@npm:4.2.0" - checksum: f051666dbc077c8324777f44fbd3aaea2986f198fe85092535130d17026c7c2ccf2d23ee5b29b36f7a4a07312db2fae23c9094b644cc35f7858b1b4fcaf27774 - languageName: node - linkType: hard - "crypto-random-string@npm:^4.0.0": version: 4.0.0 resolution: "crypto-random-string@npm:4.0.0" @@ -16617,6 +16643,13 @@ __metadata: languageName: node linkType: hard +"fflate@npm:^0.8.2": + version: 0.8.3 + resolution: "fflate@npm:0.8.3" + checksum: a2a417e8fb5128b946cb397ab59a90e089057cba492f2c17a89c4af6ba8568b3da72ed36ef1efe901df7858a20964ce56e84d282e60498be1947fcc6133bc891 + languageName: node + linkType: hard + "figures@npm:^5.0.0": version: 5.0.0 resolution: "figures@npm:5.0.0" @@ -20141,6 +20174,13 @@ __metadata: languageName: node linkType: hard +"js-md5@npm:^0.8.3": + version: 0.8.3 + resolution: "js-md5@npm:0.8.3" + checksum: b8578232d8004978036f114aa4d46ad7c06ca36b2a6889f241762263424cfea6099701ec5394a1b463ad95f18f74a2acb8c6033b5ebd6a188d67a9e704b41e05 + languageName: node + linkType: hard + "js-message@npm:1.0.7": version: 1.0.7 resolution: "js-message@npm:1.0.7" @@ -24272,6 +24312,15 @@ __metadata: languageName: node linkType: hard +"png-js@npm:^2.0.0": + version: 2.0.0 + resolution: "png-js@npm:2.0.0" + dependencies: + fflate: ^0.8.2 + checksum: a880131c0c8791dd2705e019d7d2b859a36dbabd16c4555b829d582d2ddda7495d757ca8a5fec2a944c7dad6fb27d2d1dd9ea246f0b2f61b8a700741970dbbf4 + languageName: node + linkType: hard + "pod-install@npm:^0.3.5": version: 0.3.7 resolution: "pod-install@npm:0.3.7"