@vettly/react 0.1.12

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/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # @nextauralabs/vettly-react
2
+
3
+ React components for content moderation. Real-time feedback as users type.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @nextauralabs/vettly-react
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```tsx
14
+ import { ModeratedTextarea } from '@nextauralabs/vettly-react'
15
+ import '@nextauralabs/vettly-react/styles.css'
16
+
17
+ function CommentForm() {
18
+ return (
19
+ <ModeratedTextarea
20
+ apiKey={process.env.NEXT_PUBLIC_VETTLY_API_KEY}
21
+ policy="community-safe"
22
+ placeholder="Write a comment..."
23
+ onModerationResult={(result) => {
24
+ if (result.action === 'block') {
25
+ // Content blocked
26
+ }
27
+ }}
28
+ />
29
+ )
30
+ }
31
+ ```
32
+
33
+ ## Components
34
+
35
+ ### ModeratedTextarea
36
+
37
+ ```tsx
38
+ <ModeratedTextarea
39
+ apiKey="sk_live_..."
40
+ policy="community-safe"
41
+ placeholder="Type something..."
42
+ debounceMs={500}
43
+ onModerationResult={(result) => console.log(result)}
44
+ />
45
+ ```
46
+
47
+ ### ModeratedImageUpload
48
+
49
+ ```tsx
50
+ <ModeratedImageUpload
51
+ apiKey="sk_live_..."
52
+ policy="strict"
53
+ onUpload={(file, result) => {
54
+ if (result.action !== 'block') {
55
+ uploadToServer(file)
56
+ }
57
+ }}
58
+ />
59
+ ```
60
+
61
+ ### useModeration Hook
62
+
63
+ ```tsx
64
+ import { useModeration } from '@nextauralabs/vettly-react'
65
+
66
+ function CustomInput() {
67
+ const { check, result, isLoading } = useModeration({
68
+ apiKey: 'sk_live_...',
69
+ policy: 'community-safe'
70
+ })
71
+
72
+ return (
73
+ <input onChange={(e) => check(e.target.value)} />
74
+ )
75
+ }
76
+ ```
77
+
78
+ ## Pricing
79
+
80
+ | Plan | Price | Text | Images | Videos |
81
+ |------|-------|------|--------|--------|
82
+ | Developer | Free | 2,000/mo | 100/mo | 25/mo |
83
+ | Growth | $49/mo | 50,000/mo | 5,000/mo | 1,000/mo |
84
+ | Pro | $149/mo | 250,000/mo | 25,000/mo | 5,000/mo |
85
+ | Enterprise | Custom | Unlimited | Unlimited | Unlimited |
86
+
87
+ ## Links
88
+
89
+ - [vettly.dev](https://vettly.dev) - Sign up
90
+ - [docs.vettly.dev](https://docs.vettly.dev) - Documentation