pdfjs-reader-core 0.5.10 → 0.5.11
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/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1903,6 +1903,15 @@ function detectDeviceCapabilities() {
|
|
|
1903
1903
|
screenSize
|
|
1904
1904
|
};
|
|
1905
1905
|
}
|
|
1906
|
+
function isIOSMobile() {
|
|
1907
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") {
|
|
1908
|
+
return false;
|
|
1909
|
+
}
|
|
1910
|
+
const ua = navigator.userAgent || "";
|
|
1911
|
+
if (/iPhone|iPad|iPod/i.test(ua)) return true;
|
|
1912
|
+
const isAppleTouch = /Mac/i.test(ua) && typeof navigator.maxTouchPoints === "number" && navigator.maxTouchPoints > 1;
|
|
1913
|
+
return isAppleTouch;
|
|
1914
|
+
}
|
|
1906
1915
|
function getRenderConfig(quality = "auto", capabilities) {
|
|
1907
1916
|
const caps = capabilities ?? detectDeviceCapabilities();
|
|
1908
1917
|
if (quality === "auto") {
|
|
@@ -14996,6 +15005,7 @@ function SubtitleBar({ text }) {
|
|
|
14996
15005
|
// src/director/storyboard-engine.ts
|
|
14997
15006
|
init_narration_store();
|
|
14998
15007
|
init_camera_math();
|
|
15008
|
+
init_mobile_config();
|
|
14999
15009
|
var DEFAULT_MIN_OVERLAY_MS = 3500;
|
|
15000
15010
|
var StoryboardEngine = class {
|
|
15001
15011
|
constructor(deps) {
|
|
@@ -15015,6 +15025,7 @@ var StoryboardEngine = class {
|
|
|
15015
15025
|
this.overlayRemovalTimers = /* @__PURE__ */ new Map();
|
|
15016
15026
|
this.currentStoryboardId = 0;
|
|
15017
15027
|
this.deps = deps;
|
|
15028
|
+
this.singleActiveOverlay = deps.singleActiveOverlay ?? isIOSMobile();
|
|
15018
15029
|
}
|
|
15019
15030
|
/**
|
|
15020
15031
|
* Execute a new storyboard. Cancels in-flight steps from the previous storyboard
|
|
@@ -15184,6 +15195,10 @@ var StoryboardEngine = class {
|
|
|
15184
15195
|
createdAt: Date.now(),
|
|
15185
15196
|
expiresAt: Date.now() + visibleMs
|
|
15186
15197
|
};
|
|
15198
|
+
if (this.singleActiveOverlay) {
|
|
15199
|
+
this.cancelAllRemovalTimers();
|
|
15200
|
+
narrationStore.getState().clearOverlays();
|
|
15201
|
+
}
|
|
15187
15202
|
narrationStore.getState().addOverlay(overlay);
|
|
15188
15203
|
const timer = setTimeout(() => {
|
|
15189
15204
|
narrationStore.getState().removeOverlay(overlay.id);
|