diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index b5ac79bd..00000000
--- a/.babelrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "presets": [
- [ "react-app", { "absoluteRuntime": false } ]
- ],
- "plugins": ["@babel/plugin-proposal-optional-chaining"]
-}
diff --git a/.flowconfig b/.flowconfig
deleted file mode 100644
index add1e2ae..00000000
--- a/.flowconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-[options]
-esproposal.optional_chaining=enable
diff --git a/.gitignore b/.gitignore
index 808fe5bc..b21621e4 100755
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ dist
secret.*
secret.story.*
*.secret.*
+.idea
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 00000000..f633ce67
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,4 @@
+.idea
+.github
+node_modules
+src
diff --git a/.prettierrc b/.prettierrc
index cce9d3c0..732e2200 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,3 +1,3 @@
{
- "semi": false
+ "semi": true
}
diff --git a/.storybook/addons.js b/.storybook/addons.js
deleted file mode 100644
index 6aed412d..00000000
--- a/.storybook/addons.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import '@storybook/addon-actions/register';
-import '@storybook/addon-links/register';
diff --git a/.storybook/config.js b/.storybook/config.js
deleted file mode 100644
index 25199345..00000000
--- a/.storybook/config.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// @flow
-
-import React from "react"
-import Theme from "../src/Theme"
-import { configure, addDecorator } from "@storybook/react"
-import { action } from "@storybook/addon-actions"
-import SettingsProvider from "../src/SettingsProvider"
-
-addDecorator(storyFn => {storyFn()})
-// addDecorator(storyFn => {storyFn()})
-
-function loadStories() {
- require("../src/stories")
-}
-
-configure(loadStories, module)
diff --git a/README.md b/README.md
index cd58b6be..602467dd 100755
--- a/README.md
+++ b/README.md
@@ -1,12 +1,16 @@
# React Image Annotate
-[](https://badge.fury.io/js/react-image-annotate)
+[](https://www.npmjs.com/package/@amnstak/react-image-annotate)
-The best image/video annotation tool ever. [Check out the demo here](https://universaldatatool.github.io/react-image-annotate/). Or the [code sandbox here](https://codesandbox.io/s/react-image-annotate-example-38tsc?file=/src/App.js:0-403).
+
-## Sponsors
+Implemented features in fork:
-[](https://wao.ai)
+- added typescript
+- changed seamless immutability to immer
+- updated npm and dependencies used by project
+- updated react to v.19
## Features
@@ -20,29 +24,36 @@ The best image/video annotation tool ever. [Check out the demo here](https://uni
## Usage
-`npm install react-image-annotate`
+`npm i @amnstak/react-image-annotate`
```javascript
import React from "react";
-import ReactImageAnnotate from "react-image-annotate";
+import Annotator from "@amnstak/react-image-annotate";
const App = () => (
- {
+ console.log(state);
+ }}
+ onNextImages={(state) => {
+ console.log(state);
+ }}
+ onExit={(output) => {
+ console.log({output});
+ }}
/>
);
export default App;
-
```
To get the proper fonts, make sure to import the Inter UI or Roboto font, the
@@ -56,46 +67,8 @@ following line added to a css file should suffice.
All of the following properties can be defined on the Annotator...
-| Prop | Type (\* = required) | Description | Default |
-| ------------------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------- | ------------- |
-| `taskDescription` | \*`string` | Markdown description for what to do in the image. | |
-| `allowedArea` | `{ x: number, y: number, w: number, h: number }` | Area that is available for annotation. | Entire image. |
-| `regionTagList` | `Array` | Allowed "tags" (mutually inclusive classifications) for regions. | |
-| `regionClsList` | `Array` | Allowed "classes" (mutually exclusive classifications) for regions. | |
-| `imageTagList` | `Array` | Allowed tags for entire image. | |
-| `imageClsList` | `Array` | Allowed classes for entire image. | |
-| `enabledTools` | `Array` | Tools allowed to be used. e.g. "select", "create-point", "create-box", "create-polygon" | Everything. |
-| `showTags` | `boolean` | Show tags and allow tags on regions. | `true` |
-| `selectedImage` | `string` | URL of initially selected image. | |
-| `images` | `Array` | Array of images to load into annotator | |
-| `showPointDistances` | `boolean` | Show distances between points. | `false` |
-| `pointDistancePrecision` | `number` | Precision on displayed points (e.g. 3 => 0.123) | |
-| `onExit` | `MainLayoutState => any` | Called when "Save" is called. | |
-| `RegionEditLabel` | `Node` | React Node overriding the form to update the region (see [`RegionLabel`](https://github.com/waoai/react-image-annotate/blob/master/src/RegionLabel/index.js)) | |
-| `allowComments` | `boolean` | Show a textarea to add comments on each annotation. | `false` |
-| `hidePrev` | `boolean` | Hide `Previous Image` button from the header bar. | `false` |
-| `hideNext` | `boolean` | Hide `Next Image` button from the header bar. | `false` |
-| `hideClone` | `boolean` | Hide `Clone` button from the header bar. | `false` |
-| `hideSettings` | `boolean` | Hide `Settings` button from the header bar. | `false` |
-| `hideFullScreen` | `boolean` | Hide `FullScreen/Window` button from the header bar. | `false` |
-| `hideSave` | `boolean` | Hide `Save` button from the header bar. | `false` |
-
-## Developers
-
-### Development
-
-This project uses [react-storybook](https://storybook.js.org/). To begin developing run the following commands in the cloned repo.
-
-1. `yarn install`
-2. `yarn storybook`
-
-A browser tab will automatically open with the project components.
-
-See more details in the [contributing guidelines](https://github.com/waoai/react-image-annotate/wiki/Setup-for-Development).
-
-### Icons
-
-Consult these icon repositories:
-
-- [Material Icons](https://material.io/tools/icons/)
-- [Font Awesome Icons](https://fontawesome.com/icons?d=gallery&m=free)
+Refer `AnnotatorProps`
+
+`import { AnnotatorProps } from "@amnstak/react-image-annotate";`
+
+It has a complete details of the accepted props
\ No newline at end of file
diff --git a/public/index.html b/index.html
similarity index 92%
rename from public/index.html
rename to index.html
index 3c872092..fd447762 100644
--- a/public/index.html
+++ b/index.html
@@ -4,6 +4,7 @@
+
+