teamsync-pdf-viewer 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `teamsync-pdf-viewer` are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.8.1] — 2026-09-19
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Document Comparison UX Enhancements**:
|
|
9
|
+
- **Interactive Draggable Separator**: Introduced a movable vertical split separator between documents with real-time percentage split adjustment and smooth cursor dragging.
|
|
10
|
+
- **Optimal 90% Container Auto-Fit**: Implemented proportional viewport scaling that fits comparison documents to 90% of their split container window width, ensuring readable document layout with comfortable breathing room around margins.
|
|
11
|
+
- **Split Viewport Zoom & Pan Controls**: Added visible zoom in/out, fit to width, fit to page, and pan tool controls directly inside the comparison toolbar header for each split pane.
|
|
12
|
+
- **Comparison Demo Shortcut**: Added a one-click "Compare PDF" sample button to the demo top bar and URL query parameter support (`?compare=true`) for direct deep linking.
|
|
13
|
+
- **Dynamic Office Conversion Credentials**:
|
|
14
|
+
- Client and server support for per-request converter credentials via `x-gotenberg-endpoint` and `x-gotenberg-token` headers, enabling multi-tenant and customer-provided conversion backends.
|
|
15
|
+
|
|
16
|
+
### Security
|
|
17
|
+
- **SSRF Prevention & Loopback Defense**: Strict validation of remote conversion URLs in `/api/convert`, blocking loopback (`127.0.0.0/8`, `::1`), link-local (`169.254.0.0/16`, `fe80::/10`), private RFC1918 subnets (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`), unique local IPv6 (`fc00::/7`), and major cloud provider metadata endpoints (AWS, Azure, GCP, Oracle Cloud).
|
|
18
|
+
- **SSRF Redirect Traversal Defense**: Enforced `{ redirect: 'manual' }` on upstream remote file retrieval in edge functions, terminating HTTP 3xx redirect attempts with HTTP 400 Bad Request to prevent redirect-based SSRF circumvention.
|
|
19
|
+
- **Microservice Boundary Limits**: Enforced strict 100MB download caps, 60s request timeout abort controllers, and validated content types to mitigate denial-of-service and memory exhaustion attacks.
|
|
20
|
+
- **Server Error Sanitization**: Sanitized edge conversion error responses returned to clients, ensuring low-level LibreOffice/Gotenberg stack traces and server-side errors are captured only in internal server logs.
|
|
21
|
+
- **Cross-Window PostMessage Restriction**: Replaced wildcard `*` target origin in iframe communication bridges with caller origin verification or explicit `trustedOrigins` configuration.
|
|
22
|
+
- **Safe Regular Expression & ReDoS Mitigation**: Bounded regex evaluation length and introduced defensive execution caps in document search and redaction utilities to prevent catastrophic regex backtracking.
|
|
23
|
+
- **PDF Link URI Protocol Sanitization**: Added strict protocol validation to embedded PDF links and annotation actions, rejecting malicious URI schemes (`javascript:`, `vbscript:`, `data:`) before execution.
|
|
24
|
+
- **Production Deployment Security Headers**: Added `X-Content-Type-Options: nosniff`, `Referrer-Policy: strict-origin-when-cross-origin`, and `Permissions-Policy` to production edge deployments in `vercel.json`.
|
|
25
|
+
- **Security Policy**: Added repository `SECURITY.md` establishing supported versions and responsible vulnerability disclosure workflows.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- **TypeScript Declaration Emission**: Configured `outDir: 'dist/src'` in `vite.config.ts` to ensure clean TypeScript `.d.ts` declaration generation conforming with `publint` and package exports.
|
|
29
|
+
|
|
5
30
|
## [1.8.0] — 2026-09-17
|
|
6
31
|
|
|
7
32
|
### Added
|
|
@@ -8,6 +8,13 @@ interface CompareToolbarProps {
|
|
|
8
8
|
onPrevDiff: () => void;
|
|
9
9
|
onNextDiff: () => void;
|
|
10
10
|
onExit: () => void;
|
|
11
|
+
is90Fit?: boolean;
|
|
12
|
+
zoomMultiplier?: number;
|
|
13
|
+
onZoomIn?: () => void;
|
|
14
|
+
onZoomOut?: () => void;
|
|
15
|
+
onFit90?: () => void;
|
|
16
|
+
activeTool?: string | null;
|
|
17
|
+
onSetTool?: (tool: string | null) => void;
|
|
11
18
|
}
|
|
12
|
-
export default function CompareToolbar({ compareState, onSetMode, onSetColors, onToggleCurtain, onPrevDiff, onNextDiff, onExit }: CompareToolbarProps): React.JSX.Element;
|
|
19
|
+
export default function CompareToolbar({ compareState, onSetMode, onSetColors, onToggleCurtain, onPrevDiff, onNextDiff, onExit, is90Fit, zoomMultiplier, onZoomIn, onZoomOut, onFit90, activeTool, onSetTool }: CompareToolbarProps): React.JSX.Element;
|
|
13
20
|
export {};
|
|
@@ -25,6 +25,10 @@ interface SideBySideViewerProps {
|
|
|
25
25
|
onSelectDiff?: (id: string) => void;
|
|
26
26
|
onScrollSync?: (scrollTop: number, scrollLeft: number) => void;
|
|
27
27
|
hideAnnotationsUntilPageRendered?: boolean;
|
|
28
|
+
is90Fit?: boolean;
|
|
29
|
+
zoomMultiplier?: number;
|
|
30
|
+
onZoomIn?: () => void;
|
|
31
|
+
onZoomOut?: () => void;
|
|
28
32
|
}
|
|
29
|
-
export default function SideBySideViewer({ pdfDocA, pdfDocB, pageNum, scale, rotation, basePageDims, activeTab, activeTool, annotations, watermark, watermarkText, redactions, diffsA, diffsB, selectedDiffId, onSelectDiff, hideAnnotationsUntilPageRendered }: SideBySideViewerProps): React.JSX.Element;
|
|
33
|
+
export default function SideBySideViewer({ pdfDocA, pdfDocB, pageNum, scale, rotation, basePageDims, activeTab, activeTool, annotations, watermark, watermarkText, redactions, diffsA, diffsB, selectedDiffId, onSelectDiff, hideAnnotationsUntilPageRendered, is90Fit, zoomMultiplier, onZoomIn, onZoomOut, }: SideBySideViewerProps): React.JSX.Element;
|
|
30
34
|
export {};
|