@frigate-nvr/image-annotator 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/_commonjsHelpers-DjF3Plf2.js +27 -0
- package/dist/_commonjsHelpers-DjF3Plf2.js.map +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/FormElement.css +1 -0
- package/dist/assets/FormElementBox.css +1 -0
- package/dist/components/BoundingBox.js +2553 -0
- package/dist/components/BoundingBox.js.map +1 -0
- package/dist/components/Button.js +45 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Crosshairs.js +58 -0
- package/dist/components/Crosshairs.js.map +1 -0
- package/dist/components/FormElement.js +13 -0
- package/dist/components/FormElement.js.map +1 -0
- package/dist/components/FormElementBox.js +18 -0
- package/dist/components/FormElementBox.js.map +1 -0
- package/dist/components/ImageAnnotator.js +642 -0
- package/dist/components/ImageAnnotator.js.map +1 -0
- package/dist/components/InfoDialog.js +25 -0
- package/dist/components/InfoDialog.js.map +1 -0
- package/dist/components/LabelDialog.js +27 -0
- package/dist/components/LabelDialog.js.map +1 -0
- package/dist/components/VerifyDialog.js +34 -0
- package/dist/components/VerifyDialog.js.map +1 -0
- package/dist/components/index.js +22 -0
- package/dist/components/index.js.map +1 -0
- package/dist/dialog-DrJOKYL3.js +1128 -0
- package/dist/dialog-DrJOKYL3.js.map +1 -0
- package/dist/index-sN46tOW-.js +43 -0
- package/dist/index-sN46tOW-.js.map +1 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.esm-FeyXGhGs.js +916 -0
- package/dist/index.esm-FeyXGhGs.js.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Blake Blackshear
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Frigate+ Image Annotator
|
|
2
|
+
|
|
3
|
+
This is an opinionated image annotation component designed for Frigate+.
|
|
4
|
+
|
|
5
|
+
[Storybook Demo](https://frigate-nvr.github.io/image-annotator/)
|
|
6
|
+
|
|
7
|
+
## Dependencies
|
|
8
|
+
|
|
9
|
+
This library depends on tailwind libraries for styling.
|
|
10
|
+
|
|
11
|
+
```shell
|
|
12
|
+
npm install -D tailwindcss @tailwindcss/forms
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Configuration
|
|
16
|
+
|
|
17
|
+
You need to include the library in your `tailwind.config.js` file.
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
/** @type {import('tailwindcss').Config} */
|
|
21
|
+
|
|
22
|
+
import tailwindForms from "@tailwindcss/forms";
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
content: [
|
|
26
|
+
"./index.html",
|
|
27
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
28
|
+
"node_modules/@frigate-nvr/image-annotator/dist/**/*.{js,ts,jsx,tsx}"
|
|
29
|
+
],
|
|
30
|
+
theme: {
|
|
31
|
+
extend: {},
|
|
32
|
+
},
|
|
33
|
+
plugins: [tailwindForms],
|
|
34
|
+
}
|
|
35
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function n(e) {
|
|
2
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3
|
+
}
|
|
4
|
+
function c(e) {
|
|
5
|
+
if (e.__esModule) return e;
|
|
6
|
+
var o = e.default;
|
|
7
|
+
if (typeof o == "function") {
|
|
8
|
+
var t = function r() {
|
|
9
|
+
return this instanceof r ? Reflect.construct(o, arguments, this.constructor) : o.apply(this, arguments);
|
|
10
|
+
};
|
|
11
|
+
t.prototype = o.prototype;
|
|
12
|
+
} else t = {};
|
|
13
|
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
|
|
14
|
+
var u = Object.getOwnPropertyDescriptor(e, r);
|
|
15
|
+
Object.defineProperty(t, r, u.get ? u : {
|
|
16
|
+
enumerable: !0,
|
|
17
|
+
get: function() {
|
|
18
|
+
return e[r];
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}), t;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
c as a,
|
|
25
|
+
n as g
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=_commonjsHelpers-DjF3Plf2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers-DjF3Plf2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.btn{display:inline-flex;align-items:center;justify-content:center;border-radius:.375rem;border-width:1px}.btn-base{padding:.5rem 1rem;font-size:1.125rem;font-weight:600}.btn-xl{padding:1rem 1.5rem;font-size:1.25rem;font-weight:800}.btn-xs{padding:.5rem;font-size:.875rem}.btn-sm{padding:.5rem .75rem;font-size:1rem;font-weight:500}.btn-primary{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(43 108 176 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(42 67 101 / var(--tw-bg-opacity))}.btn-primary:active{--tw-bg-opacity: 1;background-color:rgb(44 82 130 / var(--tw-bg-opacity))}.btn-secondary{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.btn-secondary:active{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.btn-red{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-red:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.btn-red:active{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.btn-green{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-green:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity))}.btn-green:active{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.input input,.input select,.input textarea{width:100%;border-radius:.375rem;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.input input:focus,.input select:focus,.input textarea:focus{--tw-border-opacity: 1;border-color:rgb(144 205 244 / var(--tw-border-opacity));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(190 227 248 / var(--tw-ring-opacity));--tw-ring-opacity: .5 }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.form-element-box input[type=checkbox],.form-element-box input[type=radio]{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(49 130 206 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.form-element-box input[type=checkbox]:hover,.form-element-box input[type=radio]:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.form-element-box input[type=checkbox]:focus,.form-element-box input[type=radio]:focus{--tw-border-opacity: 1;border-color:rgb(144 205 244 / var(--tw-border-opacity));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(190 227 248 / var(--tw-ring-opacity));--tw-ring-opacity: .5;--tw-ring-offset-width: 0px }.form-element-box input[type=checkbox]{border-radius:.25rem}
|