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/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..b85a8a2d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + target-branch: master + schedule: + interval: "weekly" + groups: + npm-deps: + patterns: + - "*" + diff --git a/.github/workflows/createRelease.yml b/.github/workflows/createRelease.yml new file mode 100644 index 00000000..67f2e893 --- /dev/null +++ b/.github/workflows/createRelease.yml @@ -0,0 +1,74 @@ +name: Create release and tag + +on: + push: + branches: [ main ] + workflow_dispatch: + inputs: + release-type: # id of input + description: "prerelease, patch, minor or major" + required: true + default: "prerelease" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + release-type: ${{ github.event.inputs.release-type }} + +jobs: + build: + name: "Creating changelog and release" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + + - name: generate tag and release body + run: | + RELEASE_TYPE=$(sh ${{ github.workspace }}/.github/workflows/getReleaseType.sh ${{ env.release-type }}) + git config user.name github-ljprojectbuilder + git config user.email code@starwit.de + npx standard-version -i CHANGELOG.md --release-as $RELEASE_TYPE --tag-prefix='' + + - name: Read CHANGELOG.md + id: package + uses: juliangruber/read-file-action@v1 + with: + path: ./CHANGELOG.md + - name: Echo CHANGELOG.md + run: echo '${{ steps.package.outputs.content }}' + + - name: publish tag + id: publish_tag + run: | + git push --follow-tags + echo ::set-output name=tag_name::$(git describe HEAD --abbrev=0) + + - name: create release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_name: Release ${{ steps.publish_tag.outputs.tag_name }} + tag_name: ${{ steps.publish_tag.outputs.tag_name }} + body_path: CHANGELOG.md + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: npm install + run: | + npm install + npm run build + - name: publish + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + access: public + package: package.json + - if: steps.publish.outputs.type != 'none' + run: | + echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" diff --git a/.github/workflows/getReleaseType.sh b/.github/workflows/getReleaseType.sh new file mode 100644 index 00000000..10cd64b9 --- /dev/null +++ b/.github/workflows/getReleaseType.sh @@ -0,0 +1,8 @@ +#!/bin/bash +case "$1" in + prerelease | patch | minor | major ) + TYPE=$1 ;; + * ) + TYPE='patch' ;; + esac +echo "$TYPE" diff --git a/.github/workflows/release-on-master.yml b/.github/workflows/release-on-master.yml deleted file mode 100644 index 34e9f675..00000000 --- a/.github/workflows/release-on-master.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Release -on: - push: - branches: - - master -jobs: - release: - if: "!contains(github.event.head_commit.message, 'skip ci')" - name: Release - runs-on: ubuntu-18.04 - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: Install dependencies - run: npm install - - name: Build Package - run: npm run build - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release - - name: Publish github pages - run: | - git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/waoai/react-image-annotate.git - npm run gh-pages -- -u "github-actions-bot " - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 8392dfff..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Test -on: ["push", "pull_request"] -jobs: - test: - if: "!contains(github.event.head_commit.message, 'skip ci')" - name: Test - runs-on: ubuntu-18.04 - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: Run Prettier Test - run: npx prettier --check "src/**/*.js" diff --git a/.gitignore b/.gitignore index 808fe5bc..35834ea3 100755 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ dist secret.* secret.story.* *.secret.* + +*.tgz \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..0aa35d8a --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +.idea 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/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..8bbe8f99 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,175 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [5.0.6](https://github.com/starwit/react-image-annotate/compare/5.0.6-0...5.0.6) (2024-04-10) + +### [5.0.6-0](https://github.com/starwit/react-image-annotate/compare/5.0.5...5.0.6-0) (2024-03-27) + +### [5.0.5](https://github.com/starwit/react-image-annotate/compare/5.0.4...5.0.5) (2024-03-21) + +### [5.0.4](https://github.com/starwit/react-image-annotate/compare/5.0.2-1...5.0.4) (2024-03-20) + +### [5.0.3](https://github.com/starwit/react-image-annotate/compare/5.0.2...5.0.3) (2024-03-18) + +### [5.0.2](https://github.com/starwit/react-image-annotate/compare/5.0.1...5.0.2) (2024-03-18) + +### [5.0.1](https://github.com/starwit/react-image-annotate/compare/4.3.5...5.0.1) (2024-02-29) + +## [5.0.0](https://github.com/starwit/react-image-annotate/compare/4.3.4...5.0.0) (2024-02-14) + +## [5.0.0](https://github.com/starwit/react-image-annotate/compare/4.3.4...5.0.0) (2024-02-14) + +### [4.3.4](https://github.com/starwit/react-image-annotate/compare/4.3.4-1...4.3.4) (2024-02-12) + +### [4.3.4-1](https://github.com/starwit/react-image-annotate/compare/4.3.4-0...4.3.4-1) (2024-02-10) + +### [4.3.4-0](https://github.com/starwit/react-image-annotate/compare/4.3.3...4.3.4-0) (2024-02-10) + +### [4.3.3](https://github.com/starwit/react-image-annotate/compare/4.3.3-1...4.3.3) (2024-02-09) + +### [4.3.3-1](https://github.com/starwit/react-image-annotate/compare/4.3.3-0...4.3.3-1) (2024-02-09) + +### [4.3.3-0](https://github.com/starwit/react-image-annotate/compare/4.3.2...4.3.3-0) (2024-02-09) + +### [4.3.2](https://github.com/starwit/react-image-annotate/compare/4.3.2-0...4.3.2) (2024-02-09) + +### [4.3.2-0](https://github.com/starwit/react-image-annotate/compare/4.3.1...4.3.2-0) (2024-02-09) + +### [4.3.1](https://github.com/starwit/react-image-annotate/compare/4.3.0...4.3.1) (2024-01-25) + +## [4.3.0](https://github.com/starwit/react-image-annotate/compare/4.2.1...4.3.0) (2024-01-09) + +### [4.2.1](https://github.com/starwit/react-image-annotate/compare/4.2.0...4.2.1) (2024-01-08) + +## [4.2.0](https://github.com/starwit/react-image-annotate/compare/4.1.1...4.2.0) (2024-01-08) + +### [4.1.1](https://github.com/starwit/react-image-annotate/compare/4.1.0...4.1.1) (2023-11-16) + + +### Features + +* Remove react-syntax-highlighter (outdated and functionality not needed) ([f4e66b8](https://github.com/starwit/react-image-annotate/commit/f4e66b8ded0c60e82b5decaa9e4df9c87b4ef014)) + +## [4.1.0](https://github.com/starwit/react-image-annotate/compare/4.0.2-0...4.1.0) (2023-11-13) + +### [4.0.1-0](https://github.com/starwit/react-image-annotate/compare/4.0.0...4.0.1-0) (2023-11-02) + +### [4.0.2-0](https://github.com/starwit/react-image-annotate/compare/4.0.0...4.0.2-0) (2023-11-02) + +### [4.0.1-0](https://github.com/starwit/react-image-annotate/compare/4.0.0...4.0.1-0) (2023-11-02) + +## [4.0.0](https://github.com/starwit/react-image-annotate/compare/3.0.2-6...4.0.0) (2023-11-02) + +### [3.0.2-6](https://github.com/starwit/react-image-annotate/compare/3.0.2-5...3.0.2-6) (2023-10-13) + +### [3.0.2-5](https://github.com/starwit/react-image-annotate/compare/3.0.2-4...3.0.2-5) (2023-10-13) + +### [3.0.2-4](https://github.com/starwit/react-image-annotate/compare/3.0.2-3...3.0.2-4) (2023-10-13) + +### [3.0.2-3](https://github.com/starwit/react-image-annotate/compare/3.0.2-2...3.0.2-3) (2023-10-13) + +### [3.0.2-2](https://github.com/starwit/react-image-annotate/compare/3.0.2-1...3.0.2-2) (2023-10-13) + +### [3.0.2-1](https://github.com/starwit/react-image-annotate/compare/3.0.2-0...3.0.2-1) (2023-10-13) + +### [3.0.2-0](https://github.com/starwit/react-image-annotate/compare/3.0.1...3.0.2-0) (2023-10-13) + +### [3.0.1](https://github.com/starwit/react-image-annotate/compare/3.0.1-3...3.0.1) (2023-10-13) + +### [3.0.1-3](https://github.com/starwit/react-image-annotate/compare/3.0.1-2...3.0.1-3) (2023-10-13) + +### [3.0.1-2](https://github.com/starwit/react-image-annotate/compare/3.0.1-1...3.0.1-2) (2023-10-12) + +### [3.0.1-1](https://github.com/starwit/react-image-annotate/compare/3.0.1-0...3.0.1-1) (2023-10-12) + +### [3.0.1-0](https://github.com/starwit/react-image-annotate/compare/3.0.0...3.0.1-0) (2023-10-12) + +## [3.0.0](https://github.com/starwit/react-image-annotate/compare/0.1.9-0...3.0.0) (2023-10-12) + +### [0.1.9-0](https://github.com/starwit/react-image-annotate/compare/0.1.8...0.1.9-0) (2023-08-30) + +### [0.1.8](https://github.com/starwit/react-image-annotate/compare/0.1.7...0.1.8) (2023-08-24) + +### [0.1.7](https://github.com/starwit/react-image-annotate/compare/0.1.6...0.1.7) (2023-08-24) + +### [0.1.6](https://github.com/starwit/react-image-annotate/compare/0.1.5...0.1.6) (2023-08-24) + +### [0.1.5](https://github.com/starwit/react-image-annotate/compare/0.1.4...0.1.5) (2023-08-24) + +### [0.1.4](https://github.com/starwit/react-image-annotate/compare/0.1.3...0.1.4) (2023-08-24) + +### [0.1.3](https://github.com/starwit/react-image-annotate/compare/0.1.2...0.1.3) (2023-08-24) + +### [0.1.2](https://github.com/starwit/react-image-annotate/compare/0.1.1...0.1.2) (2023-08-24) + +### 0.1.1 (2023-08-23) + + +### Features + +* Add Creatable Classifications ([2509d8c](https://github.com/starwit/react-image-annotate/commit/2509d8cf677e1cdc548a89e7f1ce826c63da4156)) +* Feat/custom region form ([#32](https://github.com/starwit/react-image-annotate/issues/32)) ([0d664ce](https://github.com/starwit/react-image-annotate/commit/0d664cee0e4f1378a05cda09fbc1e99e3c02b24a)) +* Merge pull request [#135](https://github.com/starwit/react-image-annotate/issues/135) from sreevardhanreddi/master ([5e05674](https://github.com/starwit/react-image-annotate/commit/5e056743bb756e9fc3af4dce7070c4e948af69f4)) +* Merge pull request [#185](https://github.com/starwit/react-image-annotate/issues/185) from HenryLiangzy/master ([ca3e864](https://github.com/starwit/react-image-annotate/commit/ca3e864326c14413e0a4df2544b5c1ecdccac987)) +* Merge pull request [#60](https://github.com/starwit/react-image-annotate/issues/60) from waoai/simple-mode ([2b09f06](https://github.com/starwit/react-image-annotate/commit/2b09f06b81b812d05a4a8ca43dc1bdeb1f2abedf)) +* Merge pull request [#66](https://github.com/starwit/react-image-annotate/issues/66) from waoai/feat/autoseg ([6d6a65b](https://github.com/starwit/react-image-annotate/commit/6d6a65bbef9d0b60989cf42faea396bd7ce18e34)) +* Merge pull request [#72](https://github.com/starwit/react-image-annotate/issues/72) from waoai/fix/integrate-react-material-workspace-layout ([493b737](https://github.com/starwit/react-image-annotate/commit/493b737cf05e931aad159f5a102328d3548025c9)) +* Merge pull request [#75](https://github.com/starwit/react-image-annotate/issues/75) from waoai/feat/zoom-on-allowed-area ([e7cf330](https://github.com/starwit/react-image-annotate/commit/e7cf330213aa1a28ed76a56eb1ca46d9d83113cf)) +* Merge pull request [#85](https://github.com/starwit/react-image-annotate/issues/85) from UniversalDataTool/feat/modify-allowed-area ([b7cb1a9](https://github.com/starwit/react-image-annotate/commit/b7cb1a958ad267dcae34a35de5fdf685e6158477)) +* Merge pull request [#93](https://github.com/starwit/react-image-annotate/issues/93) from UniversalDataTool/pose-estimation ([772db6c](https://github.com/starwit/react-image-annotate/commit/772db6cb122787e25c342ee56c20da3a9133f2b9)) + + +### Bug Fixes + +* add hiding next/prev/header/header text ([d07387f](https://github.com/starwit/react-image-annotate/commit/d07387f71b9b0dd4bc4ac6550886b256b94c3cac)) +* Add selectedTool property to Annotator ([#46](https://github.com/starwit/react-image-annotate/issues/46)) ([8de27ca](https://github.com/starwit/react-image-annotate/commit/8de27ca5b48cbb348e4c3f6f15790d91c54c9f5b)) +* allow changes to handlers (if dispatch changes) ([ef46bbe](https://github.com/starwit/react-image-annotate/commit/ef46bbecd07f9c50b75b5d9446615ccce69ab767)) +* change order, remove optional prop ([a3e4fa9](https://github.com/starwit/react-image-annotate/commit/a3e4fa9e8df7e2b11475310d9e0b829666686264)) +* converted react image annotate to use react-hotkeys, fixed double ([03763e1](https://github.com/starwit/react-image-annotate/commit/03763e1ecce28ed7013d87e6f29b5b925fcf3bac)) +* Fix/hide description on sidebar when there is no description ([#45](https://github.com/starwit/react-image-annotate/issues/45)) ([7b813f4](https://github.com/starwit/react-image-annotate/commit/7b813f4ef97a25411dd24ada34c5f74da2af0fa0)) +* force focus on click or mouse over ([c9d4e1a](https://github.com/starwit/react-image-annotate/commit/c9d4e1a79246c72d2a5cb53c006e36b7c5a29588)) +* improved focusing ([70a7e62](https://github.com/starwit/react-image-annotate/commit/70a7e62f57e71da569642bc86ad21125a9b1f07a)) +* introduce semantic release ([a1b3dd8](https://github.com/starwit/react-image-annotate/commit/a1b3dd836e28c0e8b30061cd344069647d60f377)) +* Merge pull request [#101](https://github.com/starwit/react-image-annotate/issues/101) from microvnhaxor/master ([44406a6](https://github.com/starwit/react-image-annotate/commit/44406a6eb59f974c978f8c0f899244684e821631)) +* Merge pull request [#102](https://github.com/starwit/react-image-annotate/issues/102) from Hummer12007/Hummer12007-patch-1 ([515793a](https://github.com/starwit/react-image-annotate/commit/515793aeee605553155176d6dcbf736fa8c5d1e1)) +* Merge pull request [#103](https://github.com/starwit/react-image-annotate/issues/103) from Hummer12007/del-shortcut ([09296e4](https://github.com/starwit/react-image-annotate/commit/09296e48cf1524a8c63b083dc7d2d9cf5f2ff943)) +* Merge pull request [#111](https://github.com/starwit/react-image-annotate/issues/111) from Hummer12007/fix-del ([ee87f6c](https://github.com/starwit/react-image-annotate/commit/ee87f6cb009d5a27ea1e696b4de798cae4c88aa8)) +* Merge pull request [#112](https://github.com/starwit/react-image-annotate/issues/112) from Hummer12007/undo-shortcut ([e2aaa86](https://github.com/starwit/react-image-annotate/commit/e2aaa86ceb6bda0ce1e5240ede95e0a5dafeeadb)) +* Merge pull request [#113](https://github.com/starwit/react-image-annotate/issues/113) from UniversalDataTool/update-autoseg ([7614413](https://github.com/starwit/react-image-annotate/commit/7614413538243eb8b8d11fe0d175afe21467cf30)) +* Merge pull request [#116](https://github.com/starwit/react-image-annotate/issues/116) from UniversalDataTool/keypoints-animation ([f2b04fc](https://github.com/starwit/react-image-annotate/commit/f2b04fc50fe7805510c89cf85e88fc2361ca09c2)) +* Merge pull request [#118](https://github.com/starwit/react-image-annotate/issues/118) from UniversalDataTool/various-fixes ([203a4e3](https://github.com/starwit/react-image-annotate/commit/203a4e3b258a399ddeb0da163f24b58432ee1c83)) +* Merge pull request [#120](https://github.com/starwit/react-image-annotate/issues/120) from UniversalDataTool/various-fixes ([96d5a34](https://github.com/starwit/react-image-annotate/commit/96d5a34f1feb7e5c69a51df1cf3efb20502ed3c9)) +* Merge pull request [#124](https://github.com/starwit/react-image-annotate/issues/124) from UniversalDataTool/classification-hotkeys ([adbd08f](https://github.com/starwit/react-image-annotate/commit/adbd08f895fb1c2e84d487a0efaf704f2423d158)) +* Merge pull request [#134](https://github.com/starwit/react-image-annotate/issues/134) from erobaina/master ([03e0734](https://github.com/starwit/react-image-annotate/commit/03e07343a76b8b313217853e73091c69a5711bd8)) +* Merge pull request [#178](https://github.com/starwit/react-image-annotate/issues/178) from josepdecid/master ([05e6f9e](https://github.com/starwit/react-image-annotate/commit/05e6f9ef17a5927f8760368479f04ae0cc4e7f91)) +* Merge pull request [#50](https://github.com/starwit/react-image-annotate/issues/50) from waoai/fix/uncontrolled-resizing ([3073c80](https://github.com/starwit/react-image-annotate/commit/3073c80ec3fccdd50e07042b073495d5299247b4)) +* Merge pull request [#65](https://github.com/starwit/react-image-annotate/issues/65) from waoai/fix/cross-origin-and-bb-mask ([0e4501e](https://github.com/starwit/react-image-annotate/commit/0e4501e1c530ba65259c0e36db30807df1dcf7d4)) +* Merge pull request [#70](https://github.com/starwit/react-image-annotate/issues/70) from waoai/feat/cors-fix-plus ([829068c](https://github.com/starwit/react-image-annotate/commit/829068c9641d0774116ba2461ed7dbe5db6a234b)) +* Merge pull request [#73](https://github.com/starwit/react-image-annotate/issues/73) from waoai/fix/integrate-react-material-workspace-layout ([49af055](https://github.com/starwit/react-image-annotate/commit/49af05564fca2c3cb1b94f0fd47afa071a1953c0)) +* Merge pull request [#74](https://github.com/starwit/react-image-annotate/issues/74) from waoai/fix/integrate-react-material-workspace-layout ([8bb3a54](https://github.com/starwit/react-image-annotate/commit/8bb3a54f5345b964e83c9693a62bb3e0521cc09f)) +* Merge pull request [#80](https://github.com/starwit/react-image-annotate/issues/80) from UniversalDataTool/fix/video-annotation-region-error ([cb6f1f2](https://github.com/starwit/react-image-annotate/commit/cb6f1f2731fdf324594a92c57054dc7e351243c6)) +* Merge pull request [#81](https://github.com/starwit/react-image-annotate/issues/81) from UniversalDataTool/remove-image-selector ([994ca12](https://github.com/starwit/react-image-annotate/commit/994ca12b74734cab17ff3aa8d2b4b259a24e6296)) +* Merge pull request [#82](https://github.com/starwit/react-image-annotate/issues/82) from UniversalDataTool/remove-image-selector ([4622c24](https://github.com/starwit/react-image-annotate/commit/4622c248cbc02ed0d897bc13c571119586e69beb)) +* Merge pull request [#83](https://github.com/starwit/react-image-annotate/issues/83) from UniversalDataTool/remove-image-selector ([7ef5bd0](https://github.com/starwit/react-image-annotate/commit/7ef5bd0bbb96424bc0fb242e6b8cce037693a104)) +* Merge pull request [#84](https://github.com/starwit/react-image-annotate/issues/84) from UniversalDataTool/remove-image-selector ([b0623da](https://github.com/starwit/react-image-annotate/commit/b0623daa629ef458c5467d75011b1c8db69e8551)) +* Merge pull request [#86](https://github.com/starwit/react-image-annotate/issues/86) from UniversalDataTool/fix/duplicate-images ([7a58ad6](https://github.com/starwit/react-image-annotate/commit/7a58ad6daa035c874a6769414b89a6794a94577a)) +* Merge pull request [#87](https://github.com/starwit/react-image-annotate/issues/87) from UniversalDataTool/fix/right-click-pan ([e548e1a](https://github.com/starwit/react-image-annotate/commit/e548e1a78cdb8d72f52fab05516cfab517577093)) +* Merge pull request [#97](https://github.com/starwit/react-image-annotate/issues/97) from UniversalDataTool/pose-estimation-tooltip ([ed7c309](https://github.com/starwit/react-image-annotate/commit/ed7c30961655530e9746c9f342a97a72731b45b4)) +* move build out of publishing process ([842800d](https://github.com/starwit/react-image-annotate/commit/842800d77b7e3dc2e9234c450d19e4b36c523ac1)) +* order semantic release ([c0a5f7f](https://github.com/starwit/react-image-annotate/commit/c0a5f7f9d9abad57d1b3da8fb0a14692618b1eb1)) +* pass along autosegmentation options ([2230db8](https://github.com/starwit/react-image-annotate/commit/2230db801622f8906af2c99e8090c1bd225b3205)) +* prettier fix ([358ec30](https://github.com/starwit/react-image-annotate/commit/358ec30f87c22221feb33e97ac9d1b86582ca8cc)) +* publish dist directory with github workflow ([7aee107](https://github.com/starwit/react-image-annotate/commit/7aee107e0f186b8a82b538a2250540fb6c69aaf6)) +* remove old key binding override ([453a261](https://github.com/starwit/react-image-annotate/commit/453a2613406b8b12a8ce6c428d6c558edc68f4fb)) +* run build in prepublish ([b9e7481](https://github.com/starwit/react-image-annotate/commit/b9e74819224606eeae17d448dfbe2e7be9b49b17)) +* second undefined regions on cancel ([4ca8dbc](https://github.com/starwit/react-image-annotate/commit/4ca8dbc9687efd6bae3d01766df0780423f60d7f)) +* support for duplicate images by refactoring indexing scheme ([09075d0](https://github.com/starwit/react-image-annotate/commit/09075d0f7c70b4198e503a5cbfc89f5c1431e321)) +* support non-CORS images when not doing pixel segmentation ([ffda145](https://github.com/starwit/react-image-annotate/commit/ffda1457e7d1d46429d8cb3550386c3207d1eaa5)) +* turn off warnings failing build ([2cff234](https://github.com/starwit/react-image-annotate/commit/2cff2349e634d00cb3905a3771f7a8428faf4e91)) +* undefined error when deselecting regions if not regions drawn ([5ba6e8b](https://github.com/starwit/react-image-annotate/commit/5ba6e8b2ded0031c24d883bee4b2dc02c79230d3)) +* update mmgc dep, fix blank lines in polygons ([cd784d0](https://github.com/starwit/react-image-annotate/commit/cd784d0253555b2b5dfdc6f66fd8d0614b17a6a0)) +* update mmgc1, fixes rounding issue ([bdcbbea](https://github.com/starwit/react-image-annotate/commit/bdcbbeac1be664c217a9df6bdd36fd02efd8837d)) +* update react material workspace layout with resize error fix ([5b867d7](https://github.com/starwit/react-image-annotate/commit/5b867d7d8f2808aa8bb692199863f7624459e348)) +* updated to prettier 2 ([dcb22a1](https://github.com/starwit/react-image-annotate/commit/dcb22a11ca7efeda7b5fa6ef6cc46fb98d5c153d)) +* video segmentation error because of undefined selectedImage ([5f5e4f0](https://github.com/starwit/react-image-annotate/commit/5f5e4f020851d5154207a341fd5ff106d1191945)) diff --git a/README.md b/README.md index cd58b6be..08e7f68f 100755 --- a/README.md +++ b/README.md @@ -1,15 +1,8 @@ # React Image Annotate -[![npm version](https://badge.fury.io/js/react-image-annotate.svg)](https://badge.fury.io/js/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 - -[![wao.ai sponsorship image](https://s3.amazonaws.com/asset.workaround.online/sponsorship-banner-1.png)](https://wao.ai) - ## Features +- [API Documentation](docs/content.md) - Simple input/output format - Bounding Box, Point and Polygon Annotation - Zooming, Scaling, Panning @@ -61,7 +54,9 @@ All of the following properties can be defined on the Annotator... | `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. | | +| `regionClsList` | `Array` | Allowed "classes" (mutually exclusive classifications) for regions. +| `regionColorList` | `Array` | Custom color list for regions. Default colors are used if not specified. +| `preselectCls` | `string` | Put in the class that should be preselected when creating a new Box/Polygon etc. | | | `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. | @@ -72,24 +67,25 @@ All of the following properties can be defined on the Annotator... | `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` | +| `enabledRegionProps` | `boolean` | Which properties to show in region edit popup ("class", "tags", "name", "comment") | [`class`, `name`] | | `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` | +| `userReducer` | `(state, action) => state` | User defined reducer that receives every event triggered within the annotator. See demo site for example. | | ## Developers ### Development -This project uses [react-storybook](https://storybook.js.org/). To begin developing run the following commands in the cloned repo. +To begin developing run the following commands in the cloned repo. -1. `yarn install` -2. `yarn storybook` +1. `npm install` +2. `npm start` -A browser tab will automatically open with the project components. +Then navigate to http://localhost:5173/ and start testing. See more details in the [contributing guidelines](https://github.com/waoai/react-image-annotate/wiki/Setup-for-Development). @@ -99,3 +95,15 @@ Consult these icon repositories: - [Material Icons](https://material.io/tools/icons/) - [Font Awesome Icons](https://fontawesome.com/icons?d=gallery&m=free) + +### Testdrive in project +To test this package in your project follow this quickstart: +1. Run `npm link` in the root directory of this project (where the `package.json` is located) +2. With the same Terminal window, go to your target project folder where the `package.json` is located +3. Run `npm link "@starwit/react-image-annotate"` to install the package. It might be necessary to remove a previously installed `@starwit/react-image-annotate` package. Please use the same node version when using npm link and executing the application. +4. Changes to this repository will apply live to the running dev session in your target project :) + + +### Notes +Currently, there is an issue with vite-plugin-node-polyfills (0.15.0 at the time of writing), +which shows many warnings while building (related to "use client"). That is expected and will probably be fixed in the future. See here: https://github.com/davidmyersdev/vite-plugin-node-polyfills/issues/49 diff --git a/public/index.html b/index.html similarity index 90% rename from public/index.html rename to index.html index 3c872092..87d02387 100644 --- a/public/index.html +++ b/index.html @@ -23,7 +23,9 @@ -
+
+ +