@box/pdfjs-dist 6.4.299-box.2 → 6.4.299-box.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/pdfjs-dist",
3
- "version": "6.4.299-box.2",
3
+ "version": "6.4.299-box.3",
4
4
  "author": "Box",
5
5
  "main": "build/pdf.mjs",
6
6
  "types": "types/src/pdf.d.ts",
@@ -31,5 +31,5 @@
31
31
  "node": ">=22.13.0 || >=24"
32
32
  },
33
33
  "scripts": {},
34
- "gitHead": "9c8224a283fc884add65936de6a2c9382db022b0"
34
+ "gitHead": "acc20024a21d922ff9cde3e9e82676358df970a4"
35
35
  }
@@ -4,6 +4,7 @@ export type AxisAlignedPath = {
4
4
  minSubpathHeight: number;
5
5
  };
6
6
  export function applyOpacity(color: any, opacity: any): any;
7
+ export function areBoxChangesEnabled(): boolean;
7
8
  export class ColorScheme {
8
9
  static get isDarkMode(): any;
9
10
  }
@@ -145,6 +146,13 @@ export function renderRichText({ html, dir, className }: {
145
146
  dir: any;
146
147
  className: any;
147
148
  }, container: any): void;
149
+ /**
150
+ * Turns Box's runtime changes to PDF.js on or off for every document; call it
151
+ * between renders. They are on by default; with them off, pages render like
152
+ * the upstream release this build is based on.
153
+ * @param {boolean} enabled
154
+ */
155
+ export function setBoxChangesEnabled(enabled: boolean): void;
148
156
  /**
149
157
  * @param {HTMLDivElement} div
150
158
  * @param {PageViewport} viewport
@@ -53,6 +53,7 @@ import { PixelsPerInch } from "./display/display_utils.js";
53
53
  import { RenderingCancelledException } from "./display/display_utils.js";
54
54
  import { renderRichText } from "./display/display_utils.js";
55
55
  import { ResponseException } from "./shared/util.js";
56
+ import { setBoxChangesEnabled } from "./display/display_utils.js";
56
57
  import { setLayerDimensions } from "./display/display_utils.js";
57
58
  import { shadow } from "./shared/util.js";
58
59
  import { SignatureExtractor } from "./display/editor/drawers/signaturedraw.js";
@@ -66,4 +67,4 @@ import { Util } from "./shared/util.js";
66
67
  import { VerbosityLevel } from "./shared/util.js";
67
68
  import { version } from "./display/api.js";
68
69
  import { XfaLayer } from "./display/xfa_layer.js";
69
- export { AbortException, AnnotationEditorLayer, AnnotationEditorParamsType, AnnotationEditorType, AnnotationEditorUIManager, AnnotationLayer, AnnotationMode, AnnotationType, applyOpacity, build, ColorPicker, createValidAbsoluteUrl, CSSConstants, DOMSVGFactory, DrawLayer, FeatureTest, fetchData, findContrastColor, getDocument, getFilenameFromUrl, getPdfFilenameFromUrl, getRGB, getRGBA, getUuid, GlobalWorkerOptions, ImageKind, InvalidPDFException, isDataScheme, isPdfFile, isValidExplicitDest, makeArr, makeMap, makeObj, makeSet, MathClamp, noContextMenu, normalizeUnicode, OPS, OutputScale, PasswordException, PasswordResponses, PDFDataRangeTransport, PDFDateString, PDFWorker, PermissionFlag, PixelsPerInch, RenderingCancelledException, renderRichText, ResponseException, setLayerDimensions, shadow, SignatureExtractor, stopEvent, SupportedImageMimeTypes, TextLayer, TextLayerImages, TouchManager, updateUrlHash, Util, VerbosityLevel, version, XfaLayer };
70
+ export { AbortException, AnnotationEditorLayer, AnnotationEditorParamsType, AnnotationEditorType, AnnotationEditorUIManager, AnnotationLayer, AnnotationMode, AnnotationType, applyOpacity, build, ColorPicker, createValidAbsoluteUrl, CSSConstants, DOMSVGFactory, DrawLayer, FeatureTest, fetchData, findContrastColor, getDocument, getFilenameFromUrl, getPdfFilenameFromUrl, getRGB, getRGBA, getUuid, GlobalWorkerOptions, ImageKind, InvalidPDFException, isDataScheme, isPdfFile, isValidExplicitDest, makeArr, makeMap, makeObj, makeSet, MathClamp, noContextMenu, normalizeUnicode, OPS, OutputScale, PasswordException, PasswordResponses, PDFDataRangeTransport, PDFDateString, PDFWorker, PermissionFlag, PixelsPerInch, RenderingCancelledException, renderRichText, ResponseException, setBoxChangesEnabled, setLayerDimensions, shadow, SignatureExtractor, stopEvent, SupportedImageMimeTypes, TextLayer, TextLayerImages, TouchManager, updateUrlHash, Util, VerbosityLevel, version, XfaLayer };
@@ -20,8 +20,8 @@
20
20
  */
21
21
 
22
22
  /**
23
- * pdfjsVersion = 6.4.299-box.2
24
- * pdfjsBuild = 9c8224a
23
+ * pdfjsVersion = 6.4.299-box.3
24
+ * pdfjsBuild = acc2002
25
25
  */
26
26
 
27
27
  ;// ./web/pdfjs.js
@@ -75,6 +75,7 @@ const {
75
75
  RenderingCancelledException,
76
76
  renderRichText,
77
77
  ResponseException,
78
+ setBoxChangesEnabled,
78
79
  setLayerDimensions,
79
80
  shadow,
80
81
  SignatureExtractor,
@@ -627,7 +628,7 @@ const calcRound = function () {
627
628
  }();
628
629
 
629
630
  ;// ./web/internal_evt.js
630
- const INTERNAL_EVT = "b73885cd-1954-4723-8cc0-0364b7abb527";
631
+ const INTERNAL_EVT = "1f166d3a-715c-4c7a-a062-1e0ddfefab93";
631
632
  const internalOpt = Object.freeze({
632
633
  internal: INTERNAL_EVT
633
634
  });
@@ -7985,7 +7986,7 @@ class PDFViewer {
7985
7986
  #savedPageViews = null;
7986
7987
  #deletedPageNumbers = null;
7987
7988
  constructor(options) {
7988
- const viewerVersion = "6.4.299-box.2";
7989
+ const viewerVersion = "6.4.299-box.3";
7989
7990
  if (version !== viewerVersion) {
7990
7991
  throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`);
7991
7992
  }