fix: exclude page actions from long images

This commit is contained in:
john
2026-07-27 21:21:54 +08:00
parent d1be5d9e2a
commit 5ae166fc44
3 changed files with 28 additions and 1 deletions
+8
View File
@@ -7,6 +7,13 @@ import { pathToFileURL } from 'node:url';
const DEFAULT_VIEWPORT_WIDTH = 1280;
const DEFAULT_VIEWPORT_HEIGHT = 720;
const MAX_LONG_IMAGE_HEIGHT = 20000;
export const LONG_IMAGE_EXPORT_STYLE = `
[data-mindspace-public-share],
.publication-share-fab,
.publication-share-sheet {
display: none !important;
}
`;
export function isLongImageDownloadRequest(query) {
const value = String(query?.download ?? query?.export ?? '').trim().toLowerCase();
@@ -84,6 +91,7 @@ export async function renderLongImage({
type: 'png',
animations: 'disabled',
caret: 'hide',
style: LONG_IMAGE_EXPORT_STYLE,
});
return {
outputPath: destination,