mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	Merge pull request #227 from TriliumNext/feature/client_updates
Update client dependencies, Canvas: "Copy image reference to clipboard" no longer working
This commit is contained in:
		
						commit
						2dbe3c62c2
					
				
							
								
								
									
										88
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										88
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -12,7 +12,7 @@ | |||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@braintree/sanitize-url": "6.0.4", |         "@braintree/sanitize-url": "6.0.4", | ||||||
|         "@electron/remote": "2.1.2", |         "@electron/remote": "2.1.2", | ||||||
|         "@excalidraw/excalidraw": "0.17.3", |         "@excalidraw/excalidraw": "^0.17.6", | ||||||
|         "archiver": "7.0.0", |         "archiver": "7.0.0", | ||||||
|         "async-mutex": "0.4.1", |         "async-mutex": "0.4.1", | ||||||
|         "axios": "1.6.7", |         "axios": "1.6.7", | ||||||
| @ -51,9 +51,9 @@ | |||||||
|         "jquery": "3.7.1", |         "jquery": "3.7.1", | ||||||
|         "jquery-hotkeys": "0.2.2", |         "jquery-hotkeys": "0.2.2", | ||||||
|         "jsdom": "24.0.0", |         "jsdom": "24.0.0", | ||||||
|         "katex": "0.16.9", |         "katex": "^0.16.11", | ||||||
|         "marked": "12.0.0", |         "marked": "12.0.0", | ||||||
|         "mermaid": "10.9.0", |         "mermaid": "^10.9.1", | ||||||
|         "mime-types": "2.1.35", |         "mime-types": "2.1.35", | ||||||
|         "multer": "1.4.5-lts.1", |         "multer": "1.4.5-lts.1", | ||||||
|         "node-abi": "3.56.0", |         "node-abi": "3.56.0", | ||||||
| @ -62,8 +62,8 @@ | |||||||
|         "panzoom": "9.4.3", |         "panzoom": "9.4.3", | ||||||
|         "print-this": "2.0.0", |         "print-this": "2.0.0", | ||||||
|         "rand-token": "1.0.1", |         "rand-token": "1.0.1", | ||||||
|         "react": "18.2.0", |         "react": "^18.3.1", | ||||||
|         "react-dom": "18.2.0", |         "react-dom": "^18.3.1", | ||||||
|         "request": "2.88.2", |         "request": "2.88.2", | ||||||
|         "rimraf": "5.0.5", |         "rimraf": "5.0.5", | ||||||
|         "safe-compare": "1.1.4", |         "safe-compare": "1.1.4", | ||||||
| @ -459,9 +459,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@excalidraw/excalidraw": { |     "node_modules/@excalidraw/excalidraw": { | ||||||
|       "version": "0.17.3", |       "version": "0.17.6", | ||||||
|       "resolved": "https://registry.npmjs.org/@excalidraw/excalidraw/-/excalidraw-0.17.3.tgz", |       "resolved": "https://registry.npmjs.org/@excalidraw/excalidraw/-/excalidraw-0.17.6.tgz", | ||||||
|       "integrity": "sha512-t+0sR30AboKcINt0WUJmSAC1cJy6npO37j/zONvuWvSh6XDOGoL1E0L+WYKJMBzp4wnOQhRIghQJmdfktQlO8w==", |       "integrity": "sha512-fyCl+zG/Z5yhHDh5Fq2ZGmphcrALmuOdtITm8gN4d8w4ntnaopTXcTfnAAaU3VleDC6LhTkoLOTG6P5kgREiIg==", | ||||||
|       "peerDependencies": { |       "peerDependencies": { | ||||||
|         "react": "^17.0.2 || ^18.2.0", |         "react": "^17.0.2 || ^18.2.0", | ||||||
|         "react-dom": "^17.0.2 || ^18.2.0" |         "react-dom": "^17.0.2 || ^18.2.0" | ||||||
| @ -8316,9 +8316,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/katex": { |     "node_modules/katex": { | ||||||
|       "version": "0.16.9", |       "version": "0.16.11", | ||||||
|       "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.9.tgz", |       "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", | ||||||
|       "integrity": "sha512-fsSYjWS0EEOwvy81j3vRA8TEAhQhKiqO+FQaKWp0m39qwOzHVBgAUBIXWj1pB+O2W3fIpNa6Y9KSKCVbfPhyAQ==", |       "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", | ||||||
|       "funding": [ |       "funding": [ | ||||||
|         "https://opencollective.com/katex", |         "https://opencollective.com/katex", | ||||||
|         "https://github.com/sponsors/katex" |         "https://github.com/sponsors/katex" | ||||||
| @ -8846,9 +8846,9 @@ | |||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "node_modules/mermaid": { |     "node_modules/mermaid": { | ||||||
|       "version": "10.9.0", |       "version": "10.9.1", | ||||||
|       "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.0.tgz", |       "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.1.tgz", | ||||||
|       "integrity": "sha512-swZju0hFox/B/qoLKK0rOxxgh8Cf7rJSfAUc1u8fezVihYMvrJAS45GzAxTVf4Q+xn9uMgitBcmWk7nWGXOs/g==", |       "integrity": "sha512-Mx45Obds5W1UkW1nv/7dHRsbfMM1aOKA2+Pxs/IGHNonygDHwmng8xTHyS9z4KWVi0rbko8gjiBmuwwXQ7tiNA==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@braintree/sanitize-url": "^6.0.1", |         "@braintree/sanitize-url": "^6.0.1", | ||||||
|         "@types/d3-scale": "^4.0.3", |         "@types/d3-scale": "^4.0.3", | ||||||
| @ -10695,9 +10695,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/react": { |     "node_modules/react": { | ||||||
|       "version": "18.2.0", |       "version": "18.3.1", | ||||||
|       "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", |       "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", | ||||||
|       "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", |       "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "loose-envify": "^1.1.0" |         "loose-envify": "^1.1.0" | ||||||
|       }, |       }, | ||||||
| @ -10706,15 +10706,15 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/react-dom": { |     "node_modules/react-dom": { | ||||||
|       "version": "18.2.0", |       "version": "18.3.1", | ||||||
|       "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", |       "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", | ||||||
|       "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", |       "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "loose-envify": "^1.1.0", |         "loose-envify": "^1.1.0", | ||||||
|         "scheduler": "^0.23.0" |         "scheduler": "^0.23.2" | ||||||
|       }, |       }, | ||||||
|       "peerDependencies": { |       "peerDependencies": { | ||||||
|         "react": "^18.2.0" |         "react": "^18.3.1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/react-interactive": { |     "node_modules/react-interactive": { | ||||||
| @ -11340,9 +11340,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/scheduler": { |     "node_modules/scheduler": { | ||||||
|       "version": "0.23.0", |       "version": "0.23.2", | ||||||
|       "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", |       "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", | ||||||
|       "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", |       "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "loose-envify": "^1.1.0" |         "loose-envify": "^1.1.0" | ||||||
|       } |       } | ||||||
| @ -13695,9 +13695,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@excalidraw/excalidraw": { |     "@excalidraw/excalidraw": { | ||||||
|       "version": "0.17.3", |       "version": "0.17.6", | ||||||
|       "resolved": "https://registry.npmjs.org/@excalidraw/excalidraw/-/excalidraw-0.17.3.tgz", |       "resolved": "https://registry.npmjs.org/@excalidraw/excalidraw/-/excalidraw-0.17.6.tgz", | ||||||
|       "integrity": "sha512-t+0sR30AboKcINt0WUJmSAC1cJy6npO37j/zONvuWvSh6XDOGoL1E0L+WYKJMBzp4wnOQhRIghQJmdfktQlO8w==", |       "integrity": "sha512-fyCl+zG/Z5yhHDh5Fq2ZGmphcrALmuOdtITm8gN4d8w4ntnaopTXcTfnAAaU3VleDC6LhTkoLOTG6P5kgREiIg==", | ||||||
|       "requires": {} |       "requires": {} | ||||||
|     }, |     }, | ||||||
|     "@gar/promisify": { |     "@gar/promisify": { | ||||||
| @ -19791,9 +19791,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "katex": { |     "katex": { | ||||||
|       "version": "0.16.9", |       "version": "0.16.11", | ||||||
|       "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.9.tgz", |       "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", | ||||||
|       "integrity": "sha512-fsSYjWS0EEOwvy81j3vRA8TEAhQhKiqO+FQaKWp0m39qwOzHVBgAUBIXWj1pB+O2W3fIpNa6Y9KSKCVbfPhyAQ==", |       "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "commander": "^8.3.0" |         "commander": "^8.3.0" | ||||||
|       }, |       }, | ||||||
| @ -20220,9 +20220,9 @@ | |||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "mermaid": { |     "mermaid": { | ||||||
|       "version": "10.9.0", |       "version": "10.9.1", | ||||||
|       "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.0.tgz", |       "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.1.tgz", | ||||||
|       "integrity": "sha512-swZju0hFox/B/qoLKK0rOxxgh8Cf7rJSfAUc1u8fezVihYMvrJAS45GzAxTVf4Q+xn9uMgitBcmWk7nWGXOs/g==", |       "integrity": "sha512-Mx45Obds5W1UkW1nv/7dHRsbfMM1aOKA2+Pxs/IGHNonygDHwmng8xTHyS9z4KWVi0rbko8gjiBmuwwXQ7tiNA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@braintree/sanitize-url": "^6.0.1", |         "@braintree/sanitize-url": "^6.0.1", | ||||||
|         "@types/d3-scale": "^4.0.3", |         "@types/d3-scale": "^4.0.3", | ||||||
| @ -21525,20 +21525,20 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "react": { |     "react": { | ||||||
|       "version": "18.2.0", |       "version": "18.3.1", | ||||||
|       "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", |       "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", | ||||||
|       "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", |       "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "loose-envify": "^1.1.0" |         "loose-envify": "^1.1.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "react-dom": { |     "react-dom": { | ||||||
|       "version": "18.2.0", |       "version": "18.3.1", | ||||||
|       "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", |       "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", | ||||||
|       "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", |       "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "loose-envify": "^1.1.0", |         "loose-envify": "^1.1.0", | ||||||
|         "scheduler": "^0.23.0" |         "scheduler": "^0.23.2" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "react-interactive": { |     "react-interactive": { | ||||||
| @ -22037,9 +22037,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "scheduler": { |     "scheduler": { | ||||||
|       "version": "0.23.0", |       "version": "0.23.2", | ||||||
|       "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", |       "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", | ||||||
|       "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", |       "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "loose-envify": "^1.1.0" |         "loose-envify": "^1.1.0" | ||||||
|       } |       } | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								package.json
									
									
									
									
									
								
							| @ -36,7 +36,7 @@ | |||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@braintree/sanitize-url": "6.0.4", |     "@braintree/sanitize-url": "6.0.4", | ||||||
|     "@electron/remote": "2.1.2", |     "@electron/remote": "2.1.2", | ||||||
|     "@excalidraw/excalidraw": "0.17.3", |     "@excalidraw/excalidraw": "^0.17.6", | ||||||
|     "archiver": "7.0.0", |     "archiver": "7.0.0", | ||||||
|     "async-mutex": "0.4.1", |     "async-mutex": "0.4.1", | ||||||
|     "axios": "1.6.7", |     "axios": "1.6.7", | ||||||
| @ -75,9 +75,9 @@ | |||||||
|     "jquery": "3.7.1", |     "jquery": "3.7.1", | ||||||
|     "jquery-hotkeys": "0.2.2", |     "jquery-hotkeys": "0.2.2", | ||||||
|     "jsdom": "24.0.0", |     "jsdom": "24.0.0", | ||||||
|     "katex": "0.16.9", |     "katex": "^0.16.11", | ||||||
|     "marked": "12.0.0", |     "marked": "12.0.0", | ||||||
|     "mermaid": "10.9.0", |     "mermaid": "^10.9.1", | ||||||
|     "mime-types": "2.1.35", |     "mime-types": "2.1.35", | ||||||
|     "multer": "1.4.5-lts.1", |     "multer": "1.4.5-lts.1", | ||||||
|     "node-abi": "3.56.0", |     "node-abi": "3.56.0", | ||||||
| @ -86,8 +86,8 @@ | |||||||
|     "panzoom": "9.4.3", |     "panzoom": "9.4.3", | ||||||
|     "print-this": "2.0.0", |     "print-this": "2.0.0", | ||||||
|     "rand-token": "1.0.1", |     "rand-token": "1.0.1", | ||||||
|     "react": "18.2.0", |     "react": "^18.3.1", | ||||||
|     "react-dom": "18.2.0", |     "react-dom": "^18.3.1", | ||||||
|     "request": "2.88.2", |     "request": "2.88.2", | ||||||
|     "rimraf": "5.0.5", |     "rimraf": "5.0.5", | ||||||
|     "safe-compare": "1.1.4", |     "safe-compare": "1.1.4", | ||||||
|  | |||||||
| @ -41,22 +41,21 @@ function returnImageInt(image: BNote | BRevision | null, res: Response) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function renderSvgAttachment(image: BNote | BRevision, res: Response, attachmentName: string) { | function renderSvgAttachment(image: BNote | BRevision, res: Response, attachmentName: string) { | ||||||
|     let svgString = '<svg/>' |     let svg: string | Buffer = '<svg/>' | ||||||
|     const attachment = image.getAttachmentByTitle(attachmentName); |     const attachment = image.getAttachmentByTitle(attachmentName); | ||||||
| 
 | 
 | ||||||
|     const content = attachment.getContent(); |     const content = attachment.getContent(); | ||||||
|     if (attachment && typeof content === "string") { |     if (attachment) { | ||||||
|         svgString = content; |         svg = content; | ||||||
|     } else { |     } else { | ||||||
|         // backwards compatibility, before attachments, the SVG was stored in the main note content as a separate key
 |         // backwards compatibility, before attachments, the SVG was stored in the main note content as a separate key
 | ||||||
|         const contentSvg = image.getJsonContentSafely()?.svg; |         const contentSvg = image.getJsonContentSafely()?.svg; | ||||||
| 
 | 
 | ||||||
|         if (contentSvg) { |         if (contentSvg) { | ||||||
|             svgString = contentSvg; |             svg = contentSvg; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const svg = svgString |  | ||||||
|     res.set('Content-Type', "image/svg+xml"); |     res.set('Content-Type', "image/svg+xml"); | ||||||
|     res.set("Cache-Control", "no-cache, no-store, must-revalidate"); |     res.set("Cache-Control", "no-cache, no-store, must-revalidate"); | ||||||
|     res.send(svg); |     res.send(svg); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran