pdfjs-serverless 1.3.1 → 2.0.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 (106) hide show
  1. package/README.md +52 -38
  2. package/dist/image-decoders.d.mts +1 -0
  3. package/dist/image-decoders.mjs +1 -0
  4. package/dist/index.d.mts +3 -3
  5. package/dist/index.mjs +41 -40
  6. package/dist/licenses/LICENSE_JBIG2 +196 -0
  7. package/dist/licenses/LICENSE_OPENJPEG +39 -0
  8. package/dist/licenses/LICENSE_PDFJS +177 -0
  9. package/dist/licenses/LICENSE_PDFJS_JBIG2 +13 -0
  10. package/dist/licenses/LICENSE_PDFJS_OPENJPEG +22 -0
  11. package/dist/pdfjs-decoders-workerd.mjs +1 -0
  12. package/dist/pdfjs-decoders.mjs +1 -0
  13. package/dist/pdfjs-jbig2.mjs +1 -0
  14. package/dist/pdfjs-jbig2_nowasm_fallback.mjs +1 -0
  15. package/dist/pdfjs-loader.mjs +1 -0
  16. package/dist/pdfjs-openjpeg.mjs +1 -0
  17. package/dist/pdfjs-openjpeg_nowasm_fallback.mjs +2 -0
  18. package/dist/pdfjs-rolldown-runtime.mjs +1 -0
  19. package/dist/types/external/qcms/qcms.d.ts +11 -7
  20. package/dist/types/external/qcms/qcms_utils.d.ts +1 -6
  21. package/dist/types/src/core/base_stream.d.ts +8 -1
  22. package/dist/types/src/core/catalog.d.ts +12 -12
  23. package/dist/types/src/core/colorspace.d.ts +6 -15
  24. package/dist/types/src/core/core_utils.d.ts +18 -14
  25. package/dist/types/src/core/crypto.d.ts +0 -1
  26. package/dist/types/src/core/file_spec.d.ts +4 -9
  27. package/dist/types/src/core/icc_colorspace.d.ts +0 -1
  28. package/dist/types/src/core/image_resizer.d.ts +24 -0
  29. package/dist/types/src/core/image_utils.d.ts +4 -4
  30. package/dist/types/src/core/jpeg_stream.d.ts +1 -1
  31. package/dist/types/src/core/jpg.d.ts +9 -13
  32. package/dist/types/src/core/parser.d.ts +0 -2
  33. package/dist/types/src/core/pattern.d.ts +0 -2
  34. package/dist/types/src/core/primitives.d.ts +30 -16
  35. package/dist/types/src/core/sasl_prep.d.ts +1 -0
  36. package/dist/types/src/core/sound.d.ts +39 -0
  37. package/dist/types/src/core/string_utils.d.ts +1 -1
  38. package/dist/types/src/core/struct_tree.d.ts +3 -3
  39. package/dist/types/src/core/xml_parser.d.ts +1 -2
  40. package/dist/types/src/core/xref.d.ts +2 -15
  41. package/dist/types/src/display/annotation_layer.d.ts +11 -22
  42. package/dist/types/src/display/annotation_storage.d.ts +7 -7
  43. package/dist/types/src/display/api.d.ts +155 -108
  44. package/dist/types/src/display/canvas.d.ts +2 -1
  45. package/dist/types/src/display/canvas_dependency_tracker.d.ts +8 -3
  46. package/dist/types/src/display/content_disposition.d.ts +0 -1
  47. package/dist/types/src/display/display_utils.d.ts +2 -2
  48. package/dist/types/src/display/draw_layer.d.ts +2 -6
  49. package/dist/types/src/display/editor/annotation_editor_layer.d.ts +18 -19
  50. package/dist/types/src/display/editor/color_picker.d.ts +1 -1
  51. package/dist/types/src/display/editor/comment.d.ts +1 -1
  52. package/dist/types/src/display/editor/draw.d.ts +78 -27
  53. package/dist/types/src/display/editor/drawers/freedraw.d.ts +11 -9
  54. package/dist/types/src/display/editor/drawers/highlight.d.ts +99 -15
  55. package/dist/types/src/display/editor/drawers/inkdraw.d.ts +7 -2
  56. package/dist/types/src/display/editor/drawers/outline.d.ts +65 -2
  57. package/dist/types/src/display/editor/editor.d.ts +24 -22
  58. package/dist/types/src/display/editor/freetext.d.ts +1 -1
  59. package/dist/types/src/display/editor/highlight.d.ts +44 -35
  60. package/dist/types/src/display/editor/ink.d.ts +7 -2
  61. package/dist/types/src/display/editor/stamp.d.ts +1 -1
  62. package/dist/types/src/display/editor/tools.d.ts +21 -19
  63. package/dist/types/src/display/filter_factory.d.ts +1 -3
  64. package/dist/types/src/display/font_loader.d.ts +1 -15
  65. package/dist/types/src/display/network_utils.d.ts +1 -0
  66. package/dist/types/src/display/obj_bin_transform_display.d.ts +25 -38
  67. package/dist/types/src/display/page_viewport.d.ts +5 -5
  68. package/dist/types/src/display/pages_mapper.d.ts +10 -4
  69. package/dist/types/src/display/pattern_helper.d.ts +4 -3
  70. package/dist/types/src/display/pdf_objects.d.ts +1 -3
  71. package/dist/types/src/display/text_layer.d.ts +6 -4
  72. package/dist/types/src/display/touch_manager.d.ts +46 -9
  73. package/dist/types/src/display/worker_options.d.ts +2 -2
  74. package/dist/types/src/display/xfa_layer.d.ts +9 -14
  75. package/dist/types/src/display/xfa_text.d.ts +4 -7
  76. package/dist/types/src/pdf.d.ts +8 -7
  77. package/dist/types/src/shared/base_pdf_stream.d.ts +6 -7
  78. package/dist/types/src/shared/css_utils.d.ts +8 -0
  79. package/dist/types/src/shared/message_handler.d.ts +2 -11
  80. package/dist/types/src/shared/obj_bin_transform_utils.d.ts +4 -3
  81. package/dist/types/src/shared/util.d.ts +4 -6
  82. package/dist/types/web/annotation_editor_layer_builder.d.ts +10 -8
  83. package/dist/types/web/annotation_layer_builder.d.ts +17 -21
  84. package/dist/types/web/draw_layer_builder.d.ts +7 -9
  85. package/dist/types/web/event_utils.d.ts +12 -13
  86. package/dist/types/web/genericl10n.d.ts +2 -2
  87. package/dist/types/web/l10n.d.ts +1 -1
  88. package/dist/types/web/pdf_find_controller.d.ts +9 -10
  89. package/dist/types/web/pdf_find_utils.d.ts +8 -14
  90. package/dist/types/web/pdf_history.d.ts +2 -2
  91. package/dist/types/web/pdf_link_service.d.ts +7 -9
  92. package/dist/types/web/pdf_page_view.d.ts +15 -15
  93. package/dist/types/web/pdf_rendering_queue.d.ts +7 -8
  94. package/dist/types/web/pdf_scripting_manager.d.ts +5 -5
  95. package/dist/types/web/pdf_thumbnail_view.d.ts +11 -11
  96. package/dist/types/web/pdf_thumbnail_viewer.d.ts +21 -22
  97. package/dist/types/web/pdf_viewer.d.ts +49 -29
  98. package/dist/types/web/renderable_view.d.ts +3 -3
  99. package/dist/types/web/sidebar.d.ts +3 -3
  100. package/dist/types/web/struct_tree_layer_builder.d.ts +21 -7
  101. package/dist/types/web/text_accessibility.d.ts +4 -2
  102. package/dist/types/web/text_highlighter.d.ts +7 -8
  103. package/dist/types/web/text_layer_builder.d.ts +11 -11
  104. package/dist/types/web/ui_utils.d.ts +8 -13
  105. package/dist/types/web/xfa_layer_builder.d.ts +13 -13
  106. package/package.json +27 -16
@@ -3,7 +3,7 @@ export type WaitOnEventOrTimeoutParameters = {
3
3
  * - The event target, can for example be:
4
4
  * `window`, `document`, a DOM element, or an {EventBus} instance.
5
5
  */
6
- target: Object;
6
+ target: object;
7
7
  /**
8
8
  * - The name of the event.
9
9
  */
@@ -21,21 +21,21 @@ export type WaitOnEventOrTimeoutParameters = {
21
21
  export class EventBus {
22
22
  /**
23
23
  * @param {string} eventName
24
- * @param {function} listener
25
- * @param {Object} [options]
24
+ * @param {Function} listener
25
+ * @param {object} [options]
26
26
  */
27
- on(eventName: string, listener: Function, options?: Object): void;
27
+ on(eventName: string, listener: Function, options?: object): void;
28
28
  /**
29
29
  * @param {string} eventName
30
- * @param {function} listener
31
- * @param {Object} [options]
30
+ * @param {Function} listener
31
+ * @param {object} [options]
32
32
  */
33
- off(eventName: string, listener: Function, options?: Object): void;
33
+ off(eventName: string, listener: Function, options?: object): void;
34
34
  /**
35
35
  * @param {string} eventName
36
- * @param {Object} data
36
+ * @param {object} data
37
37
  */
38
- dispatch(eventName: string, data: Object): void;
38
+ dispatch(eventName: string, data: object): void;
39
39
  #private;
40
40
  }
41
41
  /**
@@ -47,8 +47,8 @@ export class FirefoxEventBus extends EventBus {
47
47
  #private;
48
48
  }
49
49
  /**
50
- * @typedef {Object} WaitOnEventOrTimeoutParameters
51
- * @property {Object} target - The event target, can for example be:
50
+ * @typedef {object} WaitOnEventOrTimeoutParameters
51
+ * @property {object} target - The event target, can for example be:
52
52
  * `window`, `document`, a DOM element, or an {EventBus} instance.
53
53
  * @property {string} name - The name of the event.
54
54
  * @property {number} delay - The delay, in milliseconds, after which the
@@ -58,8 +58,7 @@ export class FirefoxEventBus extends EventBus {
58
58
  * Allows waiting for an event or a timeout, whichever occurs first.
59
59
  * Can be used to ensure that an action always occurs, even when an event
60
60
  * arrives late or not at all.
61
- *
62
- * @param {WaitOnEventOrTimeoutParameters}
61
+ * @param {WaitOnEventOrTimeoutParameters} params
63
62
  * @returns {Promise} A promise that is resolved with a {WaitOnType} value.
64
63
  */
65
64
  export function waitOnEventOrTimeout({ target, name, delay }: WaitOnEventOrTimeoutParameters): Promise<any>;
@@ -1,9 +1,9 @@
1
1
  export class GenericL10n extends L10n {
2
2
  /**
3
3
  * Generate the bundles for Fluent.
4
- * @param {String} defaultLang - The fallback language to use for
4
+ * @param {string} defaultLang - The fallback language to use for
5
5
  * translations.
6
- * @param {String} baseLang - The base language to use for translations.
6
+ * @param {string} baseLang - The base language to use for translations.
7
7
  */
8
8
  static #generateBundles(defaultLang: string, baseLang: string): AsyncGenerator<any, void, unknown>;
9
9
  static #createBundle(lang: any, baseURL: any, paths: any): Promise<any>;
@@ -16,7 +16,7 @@ export class L10n {
16
16
  /** @inheritdoc */
17
17
  getDirection(): string;
18
18
  /** @inheritdoc */
19
- get(ids: any, args: null | undefined, fallback: any): Promise<any>;
19
+ get(ids: any, args?: null): Promise<any>;
20
20
  /** @inheritdoc */
21
21
  translate(element: any): Promise<void>;
22
22
  /** @inheritdoc */
@@ -1,5 +1,5 @@
1
- export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
2
- export type EventBus = import("./event_utils").EventBus;
1
+ export type PDFDocumentProxy = import("../src/display/api.js").PDFDocumentProxy;
2
+ export type EventBus = import("./event_utils.js").EventBus;
3
3
  export type PDFLinkService = import("./pdf_link_service.js").PDFLinkService;
4
4
  export type PDFFindControllerOptions = {
5
5
  /**
@@ -33,7 +33,7 @@ export namespace FindState {
33
33
  export function getOriginalIndex(diffs: any, pos: any, len: any): any[];
34
34
  export function normalize(text: any, options?: {}): any[];
35
35
  /**
36
- * @typedef {Object} PDFFindControllerOptions
36
+ * @typedef {object} PDFFindControllerOptions
37
37
  * @property {PDFLinkService} linkService - The navigation/linking service.
38
38
  * @property {EventBus} eventBus - The application event bus.
39
39
  * @property {number} [delay] - The number of milliseconds to delay execution of
@@ -53,10 +53,10 @@ export class PDFFindController {
53
53
  */
54
54
  constructor({ linkService, eventBus, delay, updateMatchesCountOnProgress, }: PDFFindControllerOptions);
55
55
  _linkService: import("./pdf_link_service.js").PDFLinkService;
56
- _eventBus: import("./event_utils").EventBus;
56
+ _eventBus: import("./event_utils.js").EventBus;
57
57
  /**
58
58
  * Callback used to check if a `pageNumber` is currently visible.
59
- * @type {function}
59
+ * @type {Function}
60
60
  */
61
61
  onIsPageVisible: Function;
62
62
  get highlightMatches(): boolean | undefined;
@@ -70,23 +70,22 @@ export class PDFFindController {
70
70
  /**
71
71
  * Set a reference to the PDF document in order to search it.
72
72
  * Note that searching is not possible if this method is not called.
73
- *
74
73
  * @param {PDFDocumentProxy} pdfDocument - The PDF document to search.
75
74
  */
76
75
  setDocument(pdfDocument: PDFDocumentProxy): void;
77
- _pdfDocument: import("../src/display/api").PDFDocumentProxy | null | undefined;
76
+ _pdfDocument: import("../src/display/api.js").PDFDocumentProxy | null | undefined;
78
77
  _dirtyMatch: boolean | undefined;
79
78
  _findTimeout: any;
80
79
  _highlightMatches: boolean | undefined;
81
80
  /**
82
- * @typedef {Object} PDFFindControllerScrollMatchIntoViewParams
81
+ * @typedef {object} PDFFindControllerScrollMatchIntoViewParams
83
82
  * @property {HTMLElement} element
84
83
  * @property {number} pageIndex
85
84
  * @property {number} matchIndex
86
85
  */
87
86
  /**
88
87
  * Scroll the current match into view.
89
- * @param {PDFFindControllerScrollMatchIntoViewParams}
88
+ * @param {PDFFindControllerScrollMatchIntoViewParams} params
90
89
  */
91
90
  scrollMatchIntoView({ element, pageIndex, matchIndex }: {
92
91
  element: HTMLElement;
@@ -116,7 +115,7 @@ export class PDFFindController {
116
115
  _firstPageCapability: any;
117
116
  _rawQuery: any;
118
117
  /**
119
- * @typedef {Object} FindMatch
118
+ * @typedef {object} FindMatch
120
119
  * @property {number} index - The start of the matched text in the page's
121
120
  * string contents.
122
121
  * @property {number} length - The length of the matched text.
@@ -1,16 +1,10 @@
1
- export namespace CharacterType {
2
- let SPACE: number;
3
- let ALPHA_LETTER: number;
4
- let PUNCT: number;
5
- let HAN_LETTER: number;
6
- let KATAKANA_LETTER: number;
7
- let HIRAGANA_LETTER: number;
8
- let HALFWIDTH_KATAKANA_LETTER: number;
9
- let THAI_LETTER: number;
10
- }
1
+ export function getNormalizeWithNFKC(): any;
11
2
  /**
12
- * This function is based on the word-break detection implemented in:
13
- * https://hg.mozilla.org/mozilla-central/file/tip/intl/lwbrk/WordBreaker.cpp
3
+ * Determine if the match spanning `[startIdx, startIdx + length)` in `content`
4
+ * is a whole word, i.e. there's a word break on each side of it. Each boundary
5
+ * is tested on its two adjacent characters in isolation rather than on the
6
+ * whole string, so a contraction such as "can't" doesn't prevent "can" from
7
+ * being an entire word, matching Firefox's find:
8
+ * https://searchfox.org/firefox-main/source/toolkit/components/find/nsFind.cpp
14
9
  */
15
- export function getCharacterType(charCode: any): number;
16
- export function getNormalizeWithNFKC(): any;
10
+ export function isEntireWord(content: any, startIdx: any, length: any): boolean;
@@ -38,7 +38,7 @@ export type PushParameters = {
38
38
  */
39
39
  pageNumber: number;
40
40
  };
41
- export type EventBus = import("./event_utils").EventBus;
41
+ export type EventBus = import("./event_utils.js").EventBus;
42
42
  export type PDFLinkService = import("./pdf_link_service.js").PDFLinkService;
43
43
  export function isDestArraysEqual(firstDest: any, secondDest: any): boolean;
44
44
  export function isDestHashesEqual(destHash: any, pushHash: any): boolean;
@@ -82,7 +82,7 @@ export class PDFHistory {
82
82
  _updateViewareaTimeout: any;
83
83
  /**
84
84
  * Push an internal destination to the browser history.
85
- * @param {PushParameters}
85
+ * @param {PushParameters} params
86
86
  */
87
87
  push({ namedDest, explicitDest, pageNumber }: PushParameters): void;
88
88
  /**
@@ -1,4 +1,4 @@
1
- export type EventBus = import("./event_utils").EventBus;
1
+ export type EventBus = import("./event_utils.js").EventBus;
2
2
  export type PDFLinkServiceOptions = {
3
3
  /**
4
4
  * - The application event bus.
@@ -30,7 +30,7 @@ export namespace LinkTarget {
30
30
  let TOP: number;
31
31
  }
32
32
  /**
33
- * @typedef {Object} PDFLinkServiceOptions
33
+ * @typedef {object} PDFLinkServiceOptions
34
34
  * @property {EventBus} eventBus - The application event bus.
35
35
  * @property {number} [externalLinkTarget] - Specifies the `target` attribute
36
36
  * for external links. Must use one of the values from {LinkTarget}.
@@ -51,7 +51,7 @@ export class PDFLinkService {
51
51
  */
52
52
  constructor({ eventBus, externalLinkTarget, externalLinkRel, ignoreDestinationZoom, }?: PDFLinkServiceOptions);
53
53
  externalLinkEnabled: boolean;
54
- eventBus: import("./event_utils").EventBus;
54
+ eventBus: import("./event_utils.js").EventBus;
55
55
  externalLinkTarget: number;
56
56
  externalLinkRel: string;
57
57
  _ignoreDestinationZoom: boolean;
@@ -88,13 +88,11 @@ export class PDFLinkService {
88
88
  get isInPresentationMode(): boolean;
89
89
  /**
90
90
  * This method will, when available, also update the browser history.
91
- *
92
91
  * @param {string|Array} dest - The named, or explicit, PDF destination.
93
92
  */
94
93
  goToDestination(dest: string | any[]): Promise<void>;
95
94
  /**
96
95
  * This method will, when available, also update the browser history.
97
- *
98
96
  * @param {number|string} val - The page number, or page label.
99
97
  */
100
98
  goToPage(val: number | string): void;
@@ -103,9 +101,9 @@ export class PDFLinkService {
103
101
  * @param {number} pageNumber - The page number to scroll to.
104
102
  * @param {number} x - The x-coordinate to scroll to in page coordinates.
105
103
  * @param {number} y - The y-coordinate to scroll to in page coordinates.
106
- * @param {Object} [options]
104
+ * @param {object} [options]
107
105
  */
108
- goToXY(pageNumber: number, x: number, y: number, options?: Object): void;
106
+ goToXY(pageNumber: number, x: number, y: number, options?: object): void;
109
107
  /**
110
108
  * @param {string} id
111
109
  * Unique attachment identifier (required).
@@ -141,9 +139,9 @@ export class PDFLinkService {
141
139
  */
142
140
  executeNamedAction(action: string): void;
143
141
  /**
144
- * @param {Object} action
142
+ * @param {object} action
145
143
  */
146
- executeSetOCGState(action: Object): Promise<void>;
144
+ executeSetOCGState(action: object): Promise<void>;
147
145
  }
148
146
  export class SimpleLinkService extends PDFLinkService {
149
147
  }
@@ -1,7 +1,7 @@
1
- export type PageViewport = import("../src/display/page_viewport").PageViewport;
2
- export type OptionalContentConfig = import("../src/display/optional_content_config").OptionalContentConfig;
3
- export type EventBus = import("./event_utils").EventBus;
4
- export type PDFRenderingQueue = import("./pdf_rendering_queue").PDFRenderingQueue;
1
+ export type PageViewport = import("../src/display/page_viewport.js").PageViewport;
2
+ export type OptionalContentConfig = import("../src/display/optional_content_config.js").OptionalContentConfig;
3
+ export type EventBus = import("./event_utils.js").EventBus;
4
+ export type PDFRenderingQueue = import("./pdf_rendering_queue.js").PDFRenderingQueue;
5
5
  export type CommentManager = import("./comment_manager.js").CommentManager;
6
6
  export type L10n = import("./l10n.js").L10n;
7
7
  export type PDFPageViewOptions = {
@@ -30,11 +30,11 @@ export type PDFPageViewOptions = {
30
30
  * A promise that is resolved with an {@link OptionalContentConfig} instance.
31
31
  * The default value is `null`.
32
32
  */
33
- optionalContentConfigPromise?: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | undefined;
33
+ optionalContentConfigPromise?: Promise<import("../src/display/optional_content_config.js").OptionalContentConfig> | undefined;
34
34
  /**
35
35
  * - The rendering queue object.
36
36
  */
37
- renderingQueue?: import("./pdf_rendering_queue").PDFRenderingQueue | undefined;
37
+ renderingQueue?: import("./pdf_rendering_queue.js").PDFRenderingQueue | undefined;
38
38
  /**
39
39
  * - Controls if the text layer used for
40
40
  * selection and searching is created. The constants from {TextLayerMode}
@@ -105,7 +105,7 @@ export type PDFPageViewOptions = {
105
105
  * with user defined ones in order to improve readability in high contrast
106
106
  * mode.
107
107
  */
108
- pageColors?: Object | undefined;
108
+ pageColors?: object | undefined;
109
109
  /**
110
110
  * - Localization service.
111
111
  */
@@ -114,7 +114,7 @@ export type PDFPageViewOptions = {
114
114
  * - The object that is used to lookup
115
115
  * the necessary layer-properties.
116
116
  */
117
- layerProperties?: Object | undefined;
117
+ layerProperties?: object | undefined;
118
118
  /**
119
119
  * - Enable creation of hyperlinks from
120
120
  * text that look like URLs. The default value is `true`.
@@ -136,9 +136,9 @@ export class PDFPageView extends BasePDFPageView {
136
136
  pageLabel: string | null;
137
137
  rotation: number;
138
138
  scale: number;
139
- viewport: import("../src/display/page_viewport").PageViewport;
139
+ viewport: import("../src/display/page_viewport.js").PageViewport;
140
140
  pdfPageRotate: number;
141
- _optionalContentConfigPromise: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | null;
141
+ _optionalContentConfigPromise: Promise<import("../src/display/optional_content_config.js").OptionalContentConfig> | null;
142
142
  imageResourcesPath: string;
143
143
  enableDetailCanvas: boolean;
144
144
  maxCanvasPixels: any;
@@ -175,7 +175,7 @@ export class PDFPageView extends BasePDFPageView {
175
175
  toggleEditingMode(isEditing: any): void;
176
176
  updateVisibleArea(visibleArea: any): void;
177
177
  /**
178
- * @typedef {Object} PDFPageViewUpdateParameters
178
+ * @typedef {object} PDFPageViewUpdateParameters
179
179
  * @property {number} [scale] The new scale, if specified.
180
180
  * @property {number} [rotation] The new rotation, if specified.
181
181
  * @property {Promise<OptionalContentConfig>} [optionalContentConfigPromise]
@@ -199,7 +199,7 @@ export class PDFPageView extends BasePDFPageView {
199
199
  /**
200
200
  * A promise that is resolved with an {@link OptionalContentConfig}instance. The default value is `null`.
201
201
  */
202
- optionalContentConfigPromise?: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | undefined;
202
+ optionalContentConfigPromise?: Promise<import("../src/display/optional_content_config.js").OptionalContentConfig> | undefined;
203
203
  drawingDelay?: number | undefined;
204
204
  }): void;
205
205
  outputScale: OutputScale | undefined;
@@ -228,9 +228,9 @@ export class PDFPageView extends BasePDFPageView {
228
228
  _getRenderingContext(canvas: any, transform: any, recordOperations: any, recordImages: any): {
229
229
  canvas: any;
230
230
  transform: any;
231
- viewport: import("../src/display/page_viewport").PageViewport;
231
+ viewport: import("../src/display/page_viewport.js").PageViewport;
232
232
  annotationMode: number;
233
- optionalContentConfigPromise: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | null;
233
+ optionalContentConfigPromise: Promise<import("../src/display/optional_content_config.js").OptionalContentConfig> | null;
234
234
  annotationCanvasMap: any;
235
235
  pageColors: null;
236
236
  isEditing: boolean;
@@ -253,4 +253,4 @@ import { BasePDFPageView } from "./base_pdf_page_view.js";
253
253
  import { AnnotationLayerBuilder } from "./annotation_layer_builder.js";
254
254
  import { TextLayerBuilder } from "./text_layer_builder.js";
255
255
  import { XfaLayerBuilder } from "./xfa_layer_builder.js";
256
- import { OutputScale } from "../src/pdf";
256
+ import { OutputScale } from "../src/pdf.js";
@@ -1,6 +1,6 @@
1
- export type PDFViewer = import("./pdf_viewer").PDFViewer;
2
- export type PDFThumbnailViewer = import("./pdf_thumbnail_viewer").PDFThumbnailViewer;
3
- export type RenderableView = import("./renderable_view").RenderableView;
1
+ export type PDFViewer = import("./pdf_viewer.js").PDFViewer;
2
+ export type PDFThumbnailViewer = import("./pdf_thumbnail_viewer.js").PDFThumbnailViewer;
3
+ export type RenderableView = import("./renderable_view.js").RenderableView;
4
4
  /**
5
5
  * Controls rendering of the views for pages and thumbnails.
6
6
  */
@@ -22,17 +22,17 @@ export class PDFRenderingQueue {
22
22
  */
23
23
  isHighestPriority(view: RenderableView): boolean;
24
24
  /**
25
- * @param {Object} currentlyVisiblePages
25
+ * @param {object} currentlyVisiblePages
26
26
  */
27
- renderHighestPriority(currentlyVisiblePages: Object): void;
27
+ renderHighestPriority(currentlyVisiblePages: object): void;
28
28
  /**
29
- * @param {Object} visible
29
+ * @param {object} visible
30
30
  * @param {Array} views
31
31
  * @param {boolean} scrolledDown
32
32
  * @param {boolean} [preRenderExtra]
33
33
  * @param {boolean} [ignoreDetailViews]
34
34
  */
35
- getHighestPriority(visible: Object, views: any[], scrolledDown: boolean, preRenderExtra?: boolean, ignoreDetailViews?: boolean): any;
35
+ getHighestPriority(visible: object, views: any[], scrolledDown: boolean, preRenderExtra?: boolean, ignoreDetailViews?: boolean): any;
36
36
  /**
37
37
  * @param {RenderableView} view
38
38
  * @returns {boolean}
@@ -42,7 +42,6 @@ export class PDFRenderingQueue {
42
42
  * Render a page or thumbnail view. This calls the appropriate function
43
43
  * based on the views state. If the view is already rendered it will return
44
44
  * `false`.
45
- *
46
45
  * @param {RenderableView} view
47
46
  */
48
47
  renderView(view: RenderableView): boolean;
@@ -1,4 +1,4 @@
1
- export type EventBus = import("./event_utils").EventBus;
1
+ export type EventBus = import("./event_utils.js").EventBus;
2
2
  export type PDFScriptingManagerOptions = {
3
3
  /**
4
4
  * - The application event bus.
@@ -14,7 +14,7 @@ export type PDFScriptingManagerOptions = {
14
14
  * initializing scripting; must contain a `createScripting` method.
15
15
  * PLEASE NOTE: Primarily intended for the default viewer use-case.
16
16
  */
17
- externalServices?: Object | undefined;
17
+ externalServices?: object | undefined;
18
18
  /**
19
19
  * - The function that is used to lookup
20
20
  * the necessary document properties.
@@ -22,14 +22,14 @@ export type PDFScriptingManagerOptions = {
22
22
  docProperties?: Function | undefined;
23
23
  };
24
24
  /**
25
- * @typedef {Object} PDFScriptingManagerOptions
25
+ * @typedef {object} PDFScriptingManagerOptions
26
26
  * @property {EventBus} eventBus - The application event bus.
27
27
  * @property {string} [sandboxBundleSrc] - The path and filename of the
28
28
  * scripting bundle.
29
- * @property {Object} [externalServices] - The factory that is used when
29
+ * @property {object} [externalServices] - The factory that is used when
30
30
  * initializing scripting; must contain a `createScripting` method.
31
31
  * PLEASE NOTE: Primarily intended for the default viewer use-case.
32
- * @property {function} [docProperties] - The function that is used to lookup
32
+ * @property {Function} [docProperties] - The function that is used to lookup
33
33
  * the necessary document properties.
34
34
  */
35
35
  export class PDFScriptingManager {
@@ -20,7 +20,7 @@ export type PDFThumbnailViewOptions = {
20
20
  * A promise that is resolved with an {@link OptionalContentConfig} instance.
21
21
  * The default value is `null`.
22
22
  */
23
- optionalContentConfigPromise?: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | undefined;
23
+ optionalContentConfigPromise?: Promise<import("../src/display/optional_content_config.js").OptionalContentConfig> | undefined;
24
24
  /**
25
25
  * - The navigation/linking service.
26
26
  */
@@ -46,12 +46,12 @@ export type PDFThumbnailViewOptions = {
46
46
  * with user defined ones in order to improve readability in high contrast
47
47
  * mode.
48
48
  */
49
- pageColors?: Object | undefined;
49
+ pageColors?: object | undefined;
50
50
  };
51
- export type OptionalContentConfig = import("../src/display/optional_content_config").OptionalContentConfig;
52
- export type PageViewport = import("../src/display/page_viewport").PageViewport;
53
- export type EventBus = import("./event_utils").EventBus;
54
- export type PDFRenderingQueue = import("./pdf_rendering_queue").PDFRenderingQueue;
51
+ export type OptionalContentConfig = import("../src/display/optional_content_config.js").OptionalContentConfig;
52
+ export type PageViewport = import("../src/display/page_viewport.js").PageViewport;
53
+ export type EventBus = import("./event_utils.js").EventBus;
54
+ export type PDFRenderingQueue = import("./pdf_rendering_queue.js").PDFRenderingQueue;
55
55
  export class PDFThumbnailView extends RenderableView {
56
56
  /**
57
57
  * @param {PDFThumbnailViewOptions} options
@@ -61,15 +61,15 @@ export class PDFThumbnailView extends RenderableView {
61
61
  pageLabel: string | null;
62
62
  pdfPage: any;
63
63
  rotation: number;
64
- viewport: import("../src/display/page_viewport").PageViewport;
64
+ viewport: import("../src/display/page_viewport.js").PageViewport;
65
65
  pdfPageRotate: number;
66
- _optionalContentConfigPromise: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | null;
66
+ _optionalContentConfigPromise: Promise<import("../src/display/optional_content_config.js").OptionalContentConfig> | null;
67
67
  maxCanvasPixels: any;
68
68
  maxCanvasDim: any;
69
- pageColors: Object | null;
70
- eventBus: import("./event_utils").EventBus;
69
+ pageColors: object | null;
70
+ eventBus: import("./event_utils.js").EventBus;
71
71
  linkService: PDFLinkService;
72
- renderingQueue: import("./pdf_rendering_queue").PDFRenderingQueue;
72
+ renderingQueue: import("./pdf_rendering_queue.js").PDFRenderingQueue;
73
73
  placeholder: any;
74
74
  div: HTMLDivElement;
75
75
  imageContainer: HTMLDivElement;
@@ -1,7 +1,7 @@
1
- export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
2
- export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
3
- export type EventBus = import("./event_utils").EventBus;
4
- export type PDFRenderingQueue = import("./pdf_rendering_queue").PDFRenderingQueue;
1
+ export type PDFDocumentProxy = import("../src/display/api.js").PDFDocumentProxy;
2
+ export type PDFPageProxy = import("../src/display/api.js").PDFPageProxy;
3
+ export type EventBus = import("./event_utils.js").EventBus;
4
+ export type PDFRenderingQueue = import("./pdf_rendering_queue.js").PDFRenderingQueue;
5
5
  export type PDFLinkService = import("./pdf_link_service.js").PDFLinkService;
6
6
  export type PDFThumbnailViewerOptions = {
7
7
  /**
@@ -38,7 +38,7 @@ export type PDFThumbnailViewerOptions = {
38
38
  * with user defined ones in order to improve readability in high contrast
39
39
  * mode.
40
40
  */
41
- pageColors?: Object | undefined;
41
+ pageColors?: object | undefined;
42
42
  /**
43
43
  * - The AbortSignal for the window
44
44
  * events.
@@ -63,30 +63,30 @@ export type PDFThumbnailViewerOptions = {
63
63
  * - The status bar elements to manage the status
64
64
  * label and action when editing pages.
65
65
  */
66
- statusBar?: Object | undefined;
66
+ statusBar?: object | undefined;
67
67
  /**
68
68
  * - The undo bar elements to manage the undo
69
69
  * action.
70
70
  */
71
- undoBar?: Object | undefined;
71
+ undoBar?: object | undefined;
72
72
  /**
73
73
  * - The menu elements to manage saving edited
74
74
  * PDF.
75
75
  */
76
- manageMenu?: Object | undefined;
76
+ manageMenu?: object | undefined;
77
77
  /**
78
78
  * - The waiting bar elements shown during
79
79
  * long-running operations.
80
80
  */
81
- waitingBar?: Object | undefined;
81
+ waitingBar?: object | undefined;
82
82
  /**
83
83
  * - The file picker and button used to
84
84
  * add one or more PDF files to merge with the current one.
85
85
  */
86
- addFileComponent?: Object | undefined;
86
+ addFileComponent?: object | undefined;
87
87
  };
88
88
  /**
89
- * @typedef {Object} PDFThumbnailViewerOptions
89
+ * @typedef {object} PDFThumbnailViewerOptions
90
90
  * @property {HTMLDivElement} container - The container for the thumbnail
91
91
  * elements.
92
92
  * @property {EventBus} eventBus - The application event bus.
@@ -98,7 +98,7 @@ export type PDFThumbnailViewerOptions = {
98
98
  * @property {number} [maxCanvasDim] - The maximum supported canvas dimension,
99
99
  * in either width or height. Use `-1` for no limit.
100
100
  * The default value is 32767.
101
- * @property {Object} [pageColors] - Overwrites background and foreground colors
101
+ * @property {object} [pageColors] - Overwrites background and foreground colors
102
102
  * with user defined ones in order to improve readability in high contrast
103
103
  * mode.
104
104
  * @property {AbortSignal} [abortSignal] - The AbortSignal for the window
@@ -109,15 +109,15 @@ export type PDFThumbnailViewerOptions = {
109
109
  * The default value is `false`.
110
110
  * @property {boolean} [enableSplitMerge] - Enables split and merge features.
111
111
  * The default value is `false`.
112
- * @property {Object} [statusBar] - The status bar elements to manage the status
112
+ * @property {object} [statusBar] - The status bar elements to manage the status
113
113
  * label and action when editing pages.
114
- * @property {Object} [undoBar] - The undo bar elements to manage the undo
114
+ * @property {object} [undoBar] - The undo bar elements to manage the undo
115
115
  * action.
116
- * @property {Object} [manageMenu] - The menu elements to manage saving edited
116
+ * @property {object} [manageMenu] - The menu elements to manage saving edited
117
117
  * PDF.
118
- * @property {Object} [waitingBar] - The waiting bar elements shown during
118
+ * @property {object} [waitingBar] - The waiting bar elements shown during
119
119
  * long-running operations.
120
- * @property {Object} [addFileComponent] - The file picker and button used to
120
+ * @property {object} [addFileComponent] - The file picker and button used to
121
121
  * add one or more PDF files to merge with the current one.
122
122
  */
123
123
  /**
@@ -140,19 +140,18 @@ export class PDFThumbnailViewer {
140
140
  constructor({ container, eventBus, linkService, renderingQueue, maxCanvasPixels, maxCanvasDim, pageColors, abortSignal, enableMerge, enableSplitMerge, enableNewBadge, statusBar, undoBar, waitingBar, manageMenu, addFileComponent, }: PDFThumbnailViewerOptions);
141
141
  scrollableContainer: HTMLElement | null;
142
142
  container: HTMLDivElement;
143
- eventBus: import("./event_utils").EventBus;
143
+ eventBus: import("./event_utils.js").EventBus;
144
144
  linkService: import("./pdf_link_service.js").PDFLinkService;
145
- renderingQueue: import("./pdf_rendering_queue").PDFRenderingQueue;
145
+ renderingQueue: import("./pdf_rendering_queue.js").PDFRenderingQueue;
146
146
  maxCanvasPixels: number | undefined;
147
147
  maxCanvasDim: number | undefined;
148
- pageColors: Object | null;
148
+ pageColors: object | null;
149
149
  _manageMenu: Menu | undefined;
150
150
  scroll: {
151
151
  right: boolean;
152
152
  down: boolean;
153
153
  lastX: any;
154
154
  lastY: any;
155
- _eventHandler: (evt: any) => void;
156
155
  };
157
156
  getThumbnail(index: any): any;
158
157
  _currentPageNumber: any;
@@ -167,7 +166,7 @@ export class PDFThumbnailViewer {
167
166
  * @param {PDFDocumentProxy} pdfDocument
168
167
  */
169
168
  setDocument(pdfDocument: PDFDocumentProxy): void;
170
- pdfDocument: import("../src/display/api").PDFDocumentProxy | undefined;
169
+ pdfDocument: import("../src/display/api.js").PDFDocumentProxy | undefined;
171
170
  /**
172
171
  * @param {Array|null} labels
173
172
  */