Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
@types/react-avatar-editor
Advanced tools
Readme
npm install --save @types/react-avatar-editor
This package contains type definitions for react-avatar-editor (https://github.com/mosch/react-avatar-editor).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-avatar-editor.
import * as React from "react";
export interface Position {
x: number;
y: number;
}
export interface CroppedRect extends Position {
width: number;
height: number;
}
export interface ImageState extends CroppedRect {
resource: ImageData;
}
export interface AvatarEditorProps {
className?: string | undefined;
image: string | File;
width?: number | undefined;
height?: number | undefined;
backgroundColor?: string | undefined;
border?: number | number[] | undefined;
borderRadius?: number | undefined;
color?: number[] | undefined;
style?: object | undefined;
scale?: number | undefined;
position?: Position | undefined;
rotate?: number | undefined;
crossOrigin?: string | undefined;
disableBoundaryChecks?: boolean | undefined;
disableHiDPIScaling?: boolean | undefined;
disableCanvasRotation?: boolean | undefined;
onLoadFailure?(event: Event): void;
onLoadSuccess?(imgInfo: ImageState): void;
onImageReady?(event: Event): void;
onMouseUp?(): void;
onMouseMove?(event: Event): void;
onImageChange?(): void;
onPositionChange?(position: Position): void;
}
export default class AvatarEditor extends React.Component<AvatarEditorProps, any> {
getImage(): HTMLCanvasElement;
getImageScaledToCanvas(): HTMLCanvasElement;
getCroppingRect(): CroppedRect;
}
These definitions were written by Diogo Corrêa, Gabriel Prates, Laurent Senta, David Spiess, John Grisham, and Joshua Hintze.
FAQs
TypeScript definitions for react-avatar-editor
The npm package @types/react-avatar-editor receives a total of 82,782 weekly downloads. As such, @types/react-avatar-editor popularity was classified as popular.
We found that @types/react-avatar-editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.