From 156a7ab7e1becd2df58b4ec4302fa5f8d9c44dd7 Mon Sep 17 00:00:00 2001 From: Moz Morris Date: Sat, 7 Sep 2019 02:01:18 +0100 Subject: [PATCH] Remove react-webcam (#38149) --- notNeededPackages.json | 6 ++++ types/react-webcam/index.d.ts | 43 ----------------------- types/react-webcam/react-webcam-tests.tsx | 36 ------------------- types/react-webcam/tsconfig.json | 25 ------------- types/react-webcam/tslint.json | 1 - 5 files changed, 6 insertions(+), 105 deletions(-) delete mode 100644 types/react-webcam/index.d.ts delete mode 100644 types/react-webcam/react-webcam-tests.tsx delete mode 100644 types/react-webcam/tsconfig.json delete mode 100644 types/react-webcam/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 433e680f5d..07061bafdf 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2958,6 +2958,12 @@ "sourceRepoURL": "https://github.com/tanem/react-svg", "asOfVersion": "5.0.0" }, + { + "libraryName": "react-webcam", + "typingsPackageName": "react-webcam", + "sourceRepoURL": "https://github.com/mozmorris/react-webcam", + "asOfVersion": "3.0.0" + }, { "libraryName": "read-chunk", "typingsPackageName": "read-chunk", diff --git a/types/react-webcam/index.d.ts b/types/react-webcam/index.d.ts deleted file mode 100644 index 12fd89e618..0000000000 --- a/types/react-webcam/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Type definitions for react-webcam 1.1 -// Project: https://github.com/mozmorris/react-webcam -// Definitions by: Lucas Servén Marín -// Søren Englund -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.4 - -import * as React from 'react'; - -export = Webcam; - -declare class Webcam extends React.Component { - private static mountedInstances: Webcam[]; - private static userMediaRequested: boolean; - getScreenshot(): string|null; - getCanvas(): HTMLCanvasElement|null; - requestUserMedia(): void; - handleUserMedia(error: Error, stream: MediaStream): void; -} - -declare namespace Webcam { - interface WebcamProps { - audio?: boolean; - onUserMedia?(): void; - onUserMediaError?(): void; - height?: number|string; - width?: number|string; - screenshotFormat?: 'image/jpeg' | 'image/png' | 'image/webp'; - style?: React.CSSProperties; - className?: string; - screenshotQuality?: number; - minScreenshotWidth?: number; - minScreenshotHeight?: number; - audioConstraints?: MediaStreamConstraints["audio"]; - videoConstraints?: MediaStreamConstraints["video"]; - imageSmoothing?: boolean; - } - - interface WebcamState { - hasUserMedia: boolean; - src?: string; - } -} diff --git a/types/react-webcam/react-webcam-tests.tsx b/types/react-webcam/react-webcam-tests.tsx deleted file mode 100644 index 69626c0c58..0000000000 --- a/types/react-webcam/react-webcam-tests.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import * as React from "react"; -import Webcam = require("react-webcam"); - -export class ReactWebcamTest extends React.Component { - private webcam: Webcam; - - setRef = (webcam: Webcam) => { - this.webcam = webcam; - } - - capture = () => { - const imageSrc = this.webcam.getScreenshot(); - } - - render() { - const videoConstraints = { - width: 1280, - height: 720, - facingMode: "user" - }; - - return ( -
- - -
- ); - } -} diff --git a/types/react-webcam/tsconfig.json b/types/react-webcam/tsconfig.json deleted file mode 100644 index b48e4757e4..0000000000 --- a/types/react-webcam/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "jsx": "react", - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "react-webcam-tests.tsx" - ] -} diff --git a/types/react-webcam/tslint.json b/types/react-webcam/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/react-webcam/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }