Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pdfjs-dist

Package Overview
Dependencies
Maintainers
0
Versions
1543
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfjs-dist - npm Package Compare versions

Comparing version 4.5.136 to 4.6.82

legacy/web/images/altText_disclaimer.svg

2

package.json
{
"name": "pdfjs-dist",
"version": "4.5.136",
"version": "4.6.82",
"main": "build/pdf.mjs",

@@ -5,0 +5,0 @@ "types": "types/src/pdf.d.ts",

@@ -1375,2 +1375,9 @@ export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;

/**
* @typedef {Object} PDFWorkerParameters
* @property {string} [name] - The name of the worker.
* @property {Worker} [port] - The `workerPort` object.
* @property {number} [verbosity] - Controls the logging level;
* the constants from {@link VerbosityLevel} should be used.
*/
/**
* PDF.js web worker abstraction that controls the instantiation of PDF

@@ -1384,2 +1391,4 @@ * documents. Message handlers are used to pass information from the main

export class PDFWorker {
static "__#49@#fakeWorkerId": number;
static "__#49@#isWorkerDisabled": boolean;
static "__#49@#workerPorts": any;

@@ -1433,6 +1442,2 @@ /**

}
export namespace PDFWorkerUtil {
let isWorkerDisabled: boolean;
let fakeWorkerId: number;
}
/**

@@ -1439,0 +1444,0 @@ * Allows controlling of the rendering tasks.

@@ -8,16 +8,27 @@ export class AltText {

isEmpty(): boolean;
hasData(): boolean;
get guessedText(): null;
setGuessedText(guessedText: any): Promise<void>;
toggleAltTextBadge(visibility?: boolean): void;
serialize(isForCopying: any): {
altText: null;
decorative: boolean;
guessedText: null;
textWithDisclaimer: null;
};
/**
* Set the alt text data.
*/
set data({ altText, decorative }: {
altText: string;
set data({ altText, decorative, guessedText, textWithDisclaimer, cancel, }: {
altText: null;
decorative: boolean;
});
get data(): {
altText: string;
altText: null;
decorative: boolean;
};
toggle(enabled?: boolean): void;
shown(): void;
destroy(): void;
#private;
}

@@ -135,3 +135,3 @@ export type AnnotationEditorUIManager = import("./tools.js").AnnotationEditorUIManager;

getNextId(): string;
get _signal(): AbortSignal;
combinedSignal(ac: any): AbortSignal;
canCreateNewEmptyEditor(): boolean | undefined;

@@ -138,0 +138,0 @@ /**

@@ -36,2 +36,4 @@ export type AnnotationEditorLayer = import("./annotation_editor_layer.js").AnnotationEditorLayer;

export class AnnotationEditor {
static _l10nPromise: null;
static _l10nResizer: null;
static _borderLineWidth: number;

@@ -91,2 +93,3 @@ static _colorManager: ColorManager;

constructor(parameters: AnnotationEditorParameters);
_editToolbar: null;
_initialOptions: any;

@@ -96,3 +99,2 @@ _isVisible: boolean;

_focusEventsAllowed: boolean;
_l10nPromise: null;
parent: import("./annotation_editor_layer.js").AnnotationEditorLayer;

@@ -227,2 +229,5 @@ id: string;

getInitialTranslation(): Array<number>;
/**
* Called when the alt text dialog is closed.
*/
altTextFinish(): void;

@@ -242,3 +247,7 @@ /**

get altTextData(): any;
get guessedAltText(): any;
setGuessedAltText(text: any): Promise<void>;
serializeAltText(isForCopying: any): any;
hasAltText(): boolean;
hasAltTextData(): any;
/**

@@ -245,0 +254,0 @@ * Render this editor in a div.

@@ -43,2 +43,3 @@ /**

onScaleChanging(): void;
pointerdownAC: any;
/**

@@ -45,0 +46,0 @@ * onpointerdown callback for the canvas we're drawing on.

@@ -15,2 +15,6 @@ /**

static paste(item: any, parent: any): void;
static computeTelemetryFinalData(data: any): {
hasAltText: any;
hasNoAltText: any;
};
/** @inheritdoc */

@@ -20,2 +24,19 @@ static deserialize(data: any, parent: any, uiManager: any): AnnotationEditor | null;

/** @inheritdoc */
get telemetryFinalData(): {
type: string;
hasAltText: boolean;
};
mlGuessAltText(imageData?: null, updateAltTextData?: boolean): Promise<any>;
copyCanvas(maxDimension: any, createImageData?: boolean): {
canvas: HTMLCanvasElement;
imageData: {
width: any;
height: any;
data: Uint8ClampedArray;
};
} | {
canvas: HTMLCanvasElement;
imageData: null;
};
/** @inheritdoc */
getImageForAltText(): null;

@@ -22,0 +43,0 @@ /** @inheritdoc */

export class EditorToolbar {
static "__#4@#l10nRemove": null;
static "__#4@#pointerDown"(e: any): void;

@@ -7,3 +8,3 @@ constructor(editor: any);

show(): void;
addAltTextButton(button: any): void;
addAltText(altText: any): Promise<void>;
addColorPicker(colorPicker: any): void;

@@ -10,0 +11,0 @@ remove(): void;

@@ -15,3 +15,3 @@ export type AnnotationEditor = import("./editor.js").AnnotationEditor;

static get _keyboardManager(): any;
constructor(container: any, viewer: any, altTextManager: any, eventBus: any, pdfDocument: any, pageColors: any, highlightColors: any, enableHighlightFloatingButton: any, enableUpdatedAddImage: any, mlManager: any);
constructor(container: any, viewer: any, altTextManager: any, eventBus: any, pdfDocument: any, pageColors: any, highlightColors: any, enableHighlightFloatingButton: any, enableUpdatedAddImage: any, enableNewAltTextWhenAddingImage: any, mlManager: any);
_signal: AbortSignal;

@@ -25,5 +25,6 @@ _eventBus: any;

destroy(): void;
mlGuess(data: any): Promise<any>;
isMLEnabledFor(name: any): Promise<boolean>;
combinedSignal(ac: any): AbortSignal;
get mlManager(): null;
get useNewAltTextFlow(): boolean;
get useNewAltTextWhenAddingImage(): boolean;
get hcmFilter(): any;

@@ -34,5 +35,9 @@ get direction(): any;

setMainHighlightColorPicker(colorPicker: any): void;
editAltText(editor: any): void;
editAltText(editor: any, firstTime?: boolean): void;
switchToMode(mode: any, callback: any): void;
setPreference(name: any, value: any): void;
onSetPreference({ name, value }: {
name: any;
value: any;
}): void;
onPageChanging({ pageNumber }: {

@@ -39,0 +44,0 @@ pageNumber: any;

export class PDFNodeStream {
constructor(source: any);
source: any;
url: any;
url: URL;
isHttp: boolean;

@@ -6,0 +6,0 @@ isFsUrl: boolean;

export class AppOptions {
static eventBus: any;
static "__#64@#opts": Map<any, any>;
static get(name: any): any;

@@ -4,0 +5,0 @@ static getAll(kind?: null, defaultOnly?: boolean): any;

@@ -11,4 +11,4 @@ export type IDownloadManager = import("./interfaces").IDownloadManager;

openOrDownloadData(data: any, filename: any, dest?: null): boolean;
download(data: any, url: any, filename: any, _options: any): void;
download(data: any, url: any, filename: any): void;
#private;
}

@@ -25,5 +25,4 @@ export type PDFPageProxy = import("../src/display/api").PDFPageProxy;

* @param {string} filename
* @param {Object} [options]
*/
download(data: Uint8Array, url: string, filename: string, options?: Object | undefined): void;
download(data: Uint8Array, url: string, filename: string): void;
}

@@ -30,0 +29,0 @@ /**

@@ -26,2 +26,4 @@ export type IL10n = import("./interfaces").IL10n;

/** @inheritdoc */
translateOnce(element: any): Promise<void>;
/** @inheritdoc */
destroy(): Promise<void>;

@@ -28,0 +30,0 @@ /** @inheritdoc */

@@ -107,3 +107,27 @@ export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;

_rawQuery: any;
/**
* @typedef {Object} FindMatch
* @property {number} index - The start of the matched text in the page's
* string contents.
* @property {number} length - The length of the matched text.
*/
/**
* @param {string | string[]} query - The search query.
* @param {string} pageContent - The text content of the page to search in.
* @param {number} pageIndex - The index of the page that is being processed.
* @returns {FindMatch[] | undefined} An array of matches in the provided
* page.
*/
match(query: string | string[], pageContent: string, pageIndex: number): {
/**
* - The start of the matched text in the page's
* string contents.
*/
index: number;
/**
* - The length of the matched text.
*/
length: number;
}[] | undefined;
#private;
}

@@ -113,3 +113,3 @@ export type PageViewport = import("../src/display/display_utils").PageViewport;

annotationLayer: AnnotationLayerBuilder | null;
annotationEditorLayer: AnnotationEditorLayerBuilder | null;
annotationEditorLayer: any;
textLayer: TextLayerBuilder | null;

@@ -205,5 +205,4 @@ zoomLayer: ParentNode | null;

import { AnnotationLayerBuilder } from "./annotation_layer_builder.js";
import { AnnotationEditorLayerBuilder } from "./annotation_editor_layer_builder.js";
import { TextLayerBuilder } from "./text_layer_builder.js";
import { XfaLayerBuilder } from "./xfa_layer_builder.js";
import { OutputScale } from "./ui_utils.js";

@@ -117,5 +117,5 @@ export type OptionalContentConfig = import("../src/display/optional_content_config").OptionalContentConfig;

export class TempImageFactory {
static "__#71@#tempCanvas": null;
static "__#72@#tempCanvas": null;
static getCanvas(width: any, height: any): (HTMLCanvasElement | CanvasRenderingContext2D | null)[];
static destroyCanvas(): void;
}

@@ -520,3 +520,2 @@ export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;

};
set annotationEditorParams({ type, value }: any);
refresh(noUpdate?: boolean, updateArgs?: any): void;

@@ -523,0 +522,0 @@ #private;

@@ -29,6 +29,6 @@ export type PDFPageProxy = import("../src/display/api").PDFPageProxy;

export class TextLayerBuilder {
static "__#67@#textLayers": Map<any, any>;
static "__#67@#selectionChangeAbortController": null;
static "__#67@#removeGlobalSelectionListener"(textLayerDiv: any): void;
static "__#67@#enableGlobalSelectionListener"(): void;
static "__#68@#textLayers": Map<any, any>;
static "__#68@#selectionChangeAbortController": null;
static "__#68@#removeGlobalSelectionListener"(textLayerDiv: any): void;
static "__#68@#enableGlobalSelectionListener"(): void;
constructor({ pdfPage, highlighter, accessibilityManager, enablePermissions, onAppend, }: {

@@ -35,0 +35,0 @@ pdfPage: any;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc