teamsync-pdf-viewer 1.0.3 → 1.1.0

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/LICENSE +96 -1
  3. package/README.md +166 -165
  4. package/dist/src/annotations/types.d.ts +45 -0
  5. package/dist/src/components/AboutModal.d.ts +6 -0
  6. package/dist/src/components/AnnotationContextMenu.d.ts +17 -0
  7. package/dist/src/components/DocumentViewer.d.ts +47 -0
  8. package/dist/src/components/Header.d.ts +35 -0
  9. package/dist/src/components/InsertLinkModal.d.ts +10 -0
  10. package/dist/src/components/LeftSidebar.d.ts +10 -0
  11. package/dist/src/components/PageContextMenu.d.ts +20 -0
  12. package/dist/src/components/PageRenderer.d.ts +40 -0
  13. package/dist/src/components/SettingsModal.d.ts +8 -0
  14. package/dist/src/components/Sidebar.d.ts +18 -0
  15. package/dist/src/components/TeamSyncViewer.d.ts +35 -0
  16. package/dist/src/components/TextSelectionMenu.d.ts +18 -0
  17. package/dist/src/core/ViewerInstance.d.ts +92 -0
  18. package/dist/src/core/busContext.d.ts +3 -0
  19. package/dist/src/core/createWebViewer.d.ts +5 -0
  20. package/dist/src/core/eventBus.d.ts +25 -0
  21. package/dist/src/core/export.d.ts +20 -0
  22. package/dist/src/core/pdfAssets.d.ts +27 -0
  23. package/dist/src/core/types.d.ts +103 -0
  24. package/dist/src/hooks/usePdfSearch.d.ts +23 -0
  25. package/dist/src/hooks/useShortcuts.d.ts +13 -0
  26. package/dist/src/hooks/useViewerBus.d.ts +7 -0
  27. package/dist/src/index.d.ts +20 -0
  28. package/dist/src/plugins/index.d.ts +1 -0
  29. package/dist/src/plugins/types.d.ts +26 -0
  30. package/dist/src/utils/findRegexRedactions.d.ts +6 -0
  31. package/dist/src/utils/rotationUtils.d.ts +32 -0
  32. package/dist/style.css +2 -0
  33. package/dist/teamsync-pdf-viewer.js +5086 -0
  34. package/dist/teamsync-pdf-viewer.js.map +1 -0
  35. package/package.json +48 -15
  36. package/dist/TeamSync.pdf +0 -0
  37. package/dist/ThirdPartyNotices.txt +0 -639
  38. package/dist/favicon.svg +0 -16
  39. package/dist/icons.svg +0 -24
  40. package/dist/index.d.ts +0 -1
  41. package/dist/teamsync-pdf-viewer.css +0 -2
  42. package/dist/teamsync-pdf-viewer.es.js +0 -51524
  43. package/dist/teamsync-pdf-viewer.umd.cjs +0 -327
  44. package/dist/webviewer.js +0 -92
@@ -0,0 +1,6 @@
1
+ import { Redaction } from '../core/types';
2
+ /**
3
+ * © 2026 AngelBot Ai Pvt Ltd. All rights reserved.
4
+ */
5
+ import * as pdfjsLib from 'pdfjs-dist';
6
+ export declare function findRegexRedactions(pdfDoc: pdfjsLib.PDFDocumentProxy, regexes: RegExp[]): Promise<Redaction[]>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * © 2026 AngelBot Ai Pvt Ltd. All rights reserved.
3
+ */
4
+ /**
5
+ * Converts screen/canvas coordinates in rotated page space to canonical unrotated page space.
6
+ */
7
+ export declare function convertToUnrotated(rawX: number, rawY: number, rotation: number, unW: number, unH: number): {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ /**
12
+ * Converts canonical unrotated page coordinates to rotated page space.
13
+ */
14
+ export declare function convertToRotated(unX: number, unY: number, rotation: number, unW: number, unH: number): {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ /**
19
+ * Converts a rectangle from unrotated page space to rotated page space.
20
+ */
21
+ export declare function convertToRotatedRect(x: number, y: number, width: number, height: number, rotation: number, unW: number, unH: number): {
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ };
27
+ /**
28
+ * Returns SVG transform string for SVG groups to match page rotation.
29
+ */
30
+ export declare function getRotationTransform(rotation: number, unW: number, unH: number): string | undefined;
31
+ /** Normalizes any degree value into [0, 360). */
32
+ export declare function normalizeRotation(rotation: number): number;