pdfjs-serverless 0.5.1 → 0.7.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 (66) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.mts +1 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.mjs +1 -1
  5. package/dist/types/src/display/annotation_layer.d.ts +14 -4
  6. package/dist/types/src/display/annotation_storage.d.ts +9 -0
  7. package/dist/types/src/display/api.d.ts +119 -53
  8. package/dist/types/src/display/canvas.d.ts +4 -1
  9. package/dist/types/src/display/canvas_factory.d.ts +27 -0
  10. package/dist/types/src/display/cmap_reader_factory.d.ts +25 -0
  11. package/dist/types/src/display/display_utils.d.ts +29 -59
  12. package/dist/types/src/display/draw_layer.d.ts +6 -19
  13. package/dist/types/src/display/editor/alt_text.d.ts +17 -5
  14. package/dist/types/src/display/editor/annotation_editor_layer.d.ts +15 -9
  15. package/dist/types/src/display/editor/color_picker.d.ts +1 -0
  16. package/dist/types/src/display/editor/draw.d.ts +120 -0
  17. package/dist/types/src/display/editor/drawers/freedraw.d.ts +31 -0
  18. package/dist/types/src/display/editor/drawers/highlight.d.ts +36 -0
  19. package/dist/types/src/display/editor/drawers/inkdraw.d.ts +128 -0
  20. package/dist/types/src/display/editor/drawers/outline.d.ts +19 -0
  21. package/dist/types/src/display/editor/editor.d.ts +60 -12
  22. package/dist/types/src/display/editor/freetext.d.ts +7 -18
  23. package/dist/types/src/display/editor/highlight.d.ts +9 -27
  24. package/dist/types/src/display/editor/ink.d.ts +15 -73
  25. package/dist/types/src/display/editor/stamp.d.ts +27 -10
  26. package/dist/types/src/display/editor/toolbar.d.ts +3 -1
  27. package/dist/types/src/display/editor/tools.d.ts +32 -7
  28. package/dist/types/src/display/fetch_stream.d.ts +6 -13
  29. package/dist/types/src/display/filter_factory.d.ts +29 -0
  30. package/dist/types/src/display/font_loader.d.ts +3 -1
  31. package/dist/types/src/display/network.d.ts +10 -6
  32. package/dist/types/src/display/network_utils.d.ts +5 -3
  33. package/dist/types/src/display/node_stream.d.ts +7 -23
  34. package/dist/types/src/display/node_utils.d.ts +8 -11
  35. package/dist/types/src/display/optional_content_config.d.ts +1 -1
  36. package/dist/types/src/display/standard_fontdata_factory.d.ts +20 -0
  37. package/dist/types/src/display/svg_factory.d.ts +14 -0
  38. package/dist/types/src/display/text_layer.d.ts +15 -13
  39. package/dist/types/src/display/touch_manager.d.ts +14 -0
  40. package/dist/types/src/display/transport_stream.d.ts +1 -1
  41. package/dist/types/src/display/worker_options.d.ts +2 -2
  42. package/dist/types/src/interfaces.d.ts +4 -0
  43. package/dist/types/src/pdf.d.ts +5 -6
  44. package/dist/types/src/shared/message_handler.d.ts +10 -4
  45. package/dist/types/src/shared/util.d.ts +12 -20
  46. package/dist/types/web/annotation_editor_layer_builder.d.ts +5 -2
  47. package/dist/types/web/annotation_layer_builder.d.ts +3 -1
  48. package/dist/types/web/app_options.d.ts +4 -2
  49. package/dist/types/web/download_manager.d.ts +1 -2
  50. package/dist/types/web/event_utils.d.ts +10 -8
  51. package/dist/types/web/genericl10n.d.ts +5 -5
  52. package/dist/types/web/interfaces.d.ts +7 -14
  53. package/dist/types/web/l10n.d.ts +6 -2
  54. package/dist/types/web/pdf_find_controller.d.ts +24 -0
  55. package/dist/types/web/pdf_link_service.d.ts +2 -2
  56. package/dist/types/web/pdf_page_view.d.ts +17 -17
  57. package/dist/types/web/pdf_rendering_queue.d.ts +1 -1
  58. package/dist/types/web/pdf_thumbnail_view.d.ts +11 -3
  59. package/dist/types/web/pdf_thumbnail_viewer.d.ts +16 -1
  60. package/dist/types/web/pdf_viewer.d.ts +24 -11
  61. package/dist/types/web/struct_tree_layer_builder.d.ts +4 -2
  62. package/dist/types/web/text_layer_builder.d.ts +5 -5
  63. package/dist/types/web/ui_utils.d.ts +10 -21
  64. package/package.json +19 -19
  65. package/dist/types/src/display/base_factory.d.ts +0 -56
  66. package/dist/types/src/display/editor/outliner.d.ts +0 -70
@@ -1,56 +0,0 @@
1
- export class BaseCanvasFactory {
2
- create(width: any, height: any): {
3
- canvas: void;
4
- context: any;
5
- };
6
- reset(canvasAndContext: any, width: any, height: any): void;
7
- destroy(canvasAndContext: any): void;
8
- /**
9
- * @ignore
10
- */
11
- _createCanvas(width: any, height: any): void;
12
- }
13
- export class BaseCMapReaderFactory {
14
- constructor({ baseUrl, isCompressed }: {
15
- baseUrl?: null | undefined;
16
- isCompressed?: boolean | undefined;
17
- });
18
- baseUrl: any;
19
- isCompressed: boolean;
20
- fetch({ name }: {
21
- name: any;
22
- }): Promise<any>;
23
- /**
24
- * @ignore
25
- */
26
- _fetchData(url: any, compressionType: any): void;
27
- }
28
- export class BaseFilterFactory {
29
- addFilter(maps: any): string;
30
- addHCMFilter(fgColor: any, bgColor: any): string;
31
- addAlphaFilter(map: any): string;
32
- addLuminosityFilter(map: any): string;
33
- addHighlightHCMFilter(filterName: any, fgColor: any, bgColor: any, newFgColor: any, newBgColor: any): string;
34
- destroy(keepHCM?: boolean): void;
35
- }
36
- export class BaseStandardFontDataFactory {
37
- constructor({ baseUrl }: {
38
- baseUrl?: null | undefined;
39
- });
40
- baseUrl: any;
41
- fetch({ filename }: {
42
- filename: any;
43
- }): Promise<any>;
44
- /**
45
- * @ignore
46
- */
47
- _fetchData(url: any): void;
48
- }
49
- export class BaseSVGFactory {
50
- create(width: any, height: any, skipDimensions?: boolean): void;
51
- createElement(type: any): void;
52
- /**
53
- * @ignore
54
- */
55
- _createSVG(type: any): void;
56
- }
@@ -1,70 +0,0 @@
1
- export class FreeOutliner {
2
- static "__#20@#MIN_DIST": number;
3
- static "__#20@#MIN_DIFF": number;
4
- static "__#20@#MIN": number;
5
- constructor({ x, y }: {
6
- x: any;
7
- y: any;
8
- }, box: any, scaleFactor: any, thickness: any, isLTR: any, innerMargin?: number);
9
- get free(): boolean;
10
- isEmpty(): boolean;
11
- add({ x, y }: {
12
- x: any;
13
- y: any;
14
- }): boolean;
15
- toSVGPath(): string;
16
- getOutlines(): FreeHighlightOutline;
17
- #private;
18
- }
19
- export class Outliner {
20
- /**
21
- * Construct an outliner.
22
- * @param {Array<Object>} boxes - An array of axis-aligned rectangles.
23
- * @param {number} borderWidth - The width of the border of the boxes, it
24
- * allows to make the boxes bigger (or smaller).
25
- * @param {number} innerMargin - The margin between the boxes and the
26
- * outlines. It's important to not have a null innerMargin when we want to
27
- * draw the outline else the stroked outline could be clipped because of its
28
- * width.
29
- * @param {boolean} isLTR - true if we're in LTR mode. It's used to determine
30
- * the last point of the boxes.
31
- */
32
- constructor(boxes: Array<Object>, borderWidth?: number, innerMargin?: number, isLTR?: boolean);
33
- getOutlines(): HighlightOutline;
34
- #private;
35
- }
36
- declare class FreeHighlightOutline extends Outline {
37
- constructor(outline: any, points: any, box: any, scaleFactor: any, innerMargin: any, isLTR: any);
38
- serialize([blX, blY, trX, trY]: [any, any, any, any], rotation: any): {
39
- outline: number[];
40
- points: number[][];
41
- };
42
- get box(): null;
43
- getNewOutline(thickness: any, innerMargin: any): FreeHighlightOutline;
44
- #private;
45
- }
46
- declare class HighlightOutline extends Outline {
47
- constructor(outlines: any, box: any);
48
- /**
49
- * Serialize the outlines into the PDF page coordinate system.
50
- * @param {Array<number>} _bbox - the bounding box of the annotation.
51
- * @param {number} _rotation - the rotation of the annotation.
52
- * @returns {Array<Array<number>>}
53
- */
54
- serialize([blX, blY, trX, trY]: Array<number>, _rotation: number): Array<Array<number>>;
55
- get box(): any;
56
- #private;
57
- }
58
- declare class Outline {
59
- /**
60
- * @returns {string} The SVG path of the outline.
61
- */
62
- toSVGPath(): string;
63
- /**
64
- * @type {Object|null} The bounding box of the outline.
65
- */
66
- get box(): Object | null;
67
- serialize(_bbox: any, _rotation: any): void;
68
- get free(): any;
69
- }
70
- export {};