teamsync-pdf-viewer 1.3.3 → 1.3.4

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,14 @@
2
2
 
3
3
  All notable changes to `teamsync-pdf-viewer` are documented here.
4
4
 
5
+ ## [1.3.4] — 2026-09-04
6
+
7
+ ### Fixed
8
+ - **Mobile & Android Canvas Clamping**: Expanded `isMobileOrTablet()` to comprehensively detect Android and mobile devices, capping max dimension to 2048px and pixel buffer to 4.2 MP (~16MB) to eliminate canvas crashes and blank pages on mobile devices.
9
+ - **Render Task Lifecycle & Race Condition Fix**: Scoped `currentPage` locally within `renderCanvas` so cancelling in-flight renders during rapid zoom clicks never accidentally destroys resources of a newly scheduled page proxy.
10
+ - **Graceful Context Allocation Fallback**: Added half-resolution fallback if `getContext('2d')` ever encounters device memory pressure, preventing invisible pages.
11
+ - **Rapid Click Selection Prevention**: Added `userSelect: none` on toolbar zoom buttons to eliminate browser text selection during rapid clicking.
12
+
5
13
  ## [1.3.3] — 2026-09-04
6
14
 
7
15
  ### Fixed
@@ -3,10 +3,12 @@
3
3
  */
4
4
  export declare const MIN_SCALE = 0.1;
5
5
  export declare const MAX_SCALE = 10;
6
+ export declare const isMobileOrTablet: () => boolean;
6
7
  export declare const isSafariOrMobile: () => boolean;
7
- export declare const MAX_CANVAS_DIM = 8192;
8
- export declare const MAX_CANVAS_DIM_MOBILE = 4096;
9
- export declare const MAX_CANVAS_PIXELS = 16777216;
8
+ export declare const MAX_CANVAS_DIM = 4096;
9
+ export declare const MAX_CANVAS_DIM_MOBILE = 2048;
10
+ export declare const MAX_CANVAS_PIXELS = 8388608;
11
+ export declare const MAX_CANVAS_PIXELS_MOBILE = 4194304;
10
12
  /**
11
13
  * Calculates the next step when zooming in.
12
14
  * - Below 200%: steps by +25%