🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-mindee-js

Package Overview
Dependencies
Maintainers
6
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-mindee-js - npm Package Compare versions

Comparing version

to
1.3.2-rc.1

13

CHANGELOG.md
# CHANGELOG
## v1.3.0 (06/09/2021)
## v1.3.1 (22/10/2021)
### New
- ✨ add toBase64 utility function
### Changes
- 📝 Change docs UI
- 📝 Update README
- ✅ update tests
- 🏷️ Refactor types
chg: 🚸 AnnotationViewer - add OS X support to multi selection event key
## v1.3.0-rc2 (31/08/2021)
## v1.3.0 (07/09/2021)

@@ -14,0 +15,0 @@ ### Changes

import { Stage } from 'konva/lib/Stage';
import { AnnotationShape, AnnotationLensOptions, AnnotationViewerOptions, PointerPosition, Orientation, AnnotationData } from './common/types';
import { drawLayer, drawShape, setShapeConfig, drawShapes } from './utils/functions';
import { drawLayer, drawShape, setShapeConfig, drawShapes, toBase64 } from './utils/functions';
import getImagesFromPDF from './utils/getImagesFromPDF';

@@ -9,2 +9,2 @@ import AnnotationLens from './components/AnnotationLens';

export type { Stage, AnnotationShape, AnnotationLensOptions, AnnotationViewerOptions, PointerPosition, Orientation, AnnotationData, };
export { drawShapes, dataURItoBlob, AnnotationLens, AnnotationViewer, getImagesFromPDF, drawShape, drawLayer, setShapeConfig, };
export { toBase64, drawShapes, dataURItoBlob, AnnotationLens, AnnotationViewer, getImagesFromPDF, drawShape, drawLayer, setShapeConfig, };
import { Stage } from 'konva/lib/Stage';
import { drawLayer, drawShape, setShapeConfig, drawShapes, } from './utils/functions';
import { drawLayer, drawShape, setShapeConfig, drawShapes, toBase64, } from './utils/functions';
import getImagesFromPDF from './utils/getImagesFromPDF';

@@ -7,2 +7,2 @@ import AnnotationLens from './components/AnnotationLens';

import { dataURItoBlob } from './utils/image';
export { drawShapes, dataURItoBlob, AnnotationLens, AnnotationViewer, getImagesFromPDF, drawShape, drawLayer, setShapeConfig, };
export { toBase64, drawShapes, dataURItoBlob, AnnotationLens, AnnotationViewer, getImagesFromPDF, drawShape, drawLayer, setShapeConfig, };

@@ -8,1 +8,2 @@ import Konva from 'konva';

export declare const setShapeConfig: (stage: Konva.Stage, id: string | number, config: LineConfig) => void;
export declare const toBase64: (base64: string, type?: 'application/pdf' | 'image/jpeg' | 'image/png' | 'image/svg+xml') => string;

@@ -39,1 +39,2 @@ import { KONVA_REFS } from "../common/constants";

};
export const toBase64 = (base64, type = 'image/jpeg') => `data:${type};base64,${base64}`;
import useEventListener from './useEventListener';
import { Key } from 'ts-key-enum';
export default function useMultiSelection({ stage, isSelectionActiveRef, }) {
useEventListener('keydown', (event) => {
event.stopPropagation();
switch (event.key) {
case Key.Control:
stage === null || stage === void 0 ? void 0 : stage.draggable(false);
isSelectionActiveRef.current = true;
break;
default:
break;
if (event.ctrlKey || event.altKey) {
stage === null || stage === void 0 ? void 0 : stage.draggable(false);
isSelectionActiveRef.current = true;
}

@@ -17,11 +12,7 @@ });

event.stopPropagation();
switch (event.key) {
case Key.Control:
stage === null || stage === void 0 ? void 0 : stage.draggable(true);
isSelectionActiveRef.current = false;
break;
default:
break;
if (event.ctrlKey || event.altKey) {
stage === null || stage === void 0 ? void 0 : stage.draggable(false);
isSelectionActiveRef.current = true;
}
});
}
{
"name": "react-mindee-js",
"version": "1.3.0",
"version": "1.3.2-rc.1",
"description": "Front-End Computer Vision SDK for React",

@@ -18,3 +18,2 @@ "author": "@mindee",

"pdfjs-dist": "2.6.347",
"ts-key-enum": "^2.0.7",
"uuid": "^8.3.2"

@@ -39,2 +38,3 @@ },

"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-patch": "^1.4.3",

@@ -44,4 +44,3 @@ "typescript": "^4.1.2",

"vite": "^2.5.1",
"vite-tsconfig-paths": "^3.3.13",
"react-dom": "^17.0.2"
"vite-tsconfig-paths": "^3.3.13"
},

@@ -48,0 +47,0 @@ "peerDependencies": {

@@ -33,3 +33,3 @@ # Check [React mindee documentation](https://react-mindee-js.netlify.app) for docs, guides, API and more!

```bash
npm install --save react-mindee-js@1.3.0
npm install --save react-mindee-js
```

@@ -40,3 +40,3 @@

```
yarn add react-mindee-js@1.3.0
yarn add react-mindee-js
```

@@ -43,0 +43,0 @@