@jarve/bug-reporter 0.1.1 → 0.3.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/README.md +8 -7
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +299 -152
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +299 -152
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ Bug reporter widget for Next.js apps. Reports flow to your JARVE Agency dashboar
|
|
|
14
14
|
### 1. Register your site
|
|
15
15
|
|
|
16
16
|
Go to your JARVE Agency dashboard at `/admin/bug-reports/sites` and:
|
|
17
|
+
|
|
17
18
|
- Click **Add Site**
|
|
18
19
|
- Enter your site name and color
|
|
19
20
|
- Click **Generate API Key**
|
|
@@ -34,7 +35,7 @@ The widget uses Tailwind CSS classes. Add the package to your Tailwind content c
|
|
|
34
35
|
**Tailwind v4** (add `@source` in your CSS file):
|
|
35
36
|
|
|
36
37
|
```css
|
|
37
|
-
@source
|
|
38
|
+
@source '../node_modules/@jarve/bug-reporter/dist';
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
**Tailwind v3** (add to `content` in `tailwind.config.ts`):
|
|
@@ -72,12 +73,12 @@ Click the blue bug icon (bottom-right) to report bugs. They'll appear in your JA
|
|
|
72
73
|
|
|
73
74
|
## Props
|
|
74
75
|
|
|
75
|
-
| Prop
|
|
76
|
-
|
|
77
|
-
| `apiUrl`
|
|
78
|
-
| `apiKey`
|
|
79
|
-
| `user`
|
|
80
|
-
| `children` | `ReactNode`
|
|
76
|
+
| Prop | Type | Required | Description |
|
|
77
|
+
| ---------- | --------------------------------- | -------- | ---------------------------------------------------------- |
|
|
78
|
+
| `apiUrl` | `string` | Yes | Base URL for the external bug reporter API |
|
|
79
|
+
| `apiKey` | `string` | Yes | Your site's API key (starts with `brk_`) |
|
|
80
|
+
| `user` | `{ name: string, email: string }` | No | User info. If omitted, the AI will ask during conversation |
|
|
81
|
+
| `children` | `ReactNode` | Yes | Your app content |
|
|
81
82
|
|
|
82
83
|
## What gets captured
|
|
83
84
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
type FloatingButtonPosition = 'left' | 'right';
|
|
4
|
+
|
|
3
5
|
interface BugReporterUser {
|
|
4
6
|
name: string;
|
|
5
7
|
email: string;
|
|
@@ -14,10 +16,12 @@ interface JarveBugReporterProps {
|
|
|
14
16
|
apiUrl: string;
|
|
15
17
|
/** API key for your site (starts with "brk_") */
|
|
16
18
|
apiKey: string;
|
|
19
|
+
/** Optional position for the floating button (default: 'right') */
|
|
20
|
+
buttonPosition?: FloatingButtonPosition;
|
|
17
21
|
/** Optional user info. If not provided, the AI will ask for name/email during the conversation. */
|
|
18
22
|
user?: BugReporterUser;
|
|
19
23
|
children: React.ReactNode;
|
|
20
24
|
}
|
|
21
|
-
declare function JarveBugReporter({ apiUrl, apiKey, user, children, }: JarveBugReporterProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function JarveBugReporter({ apiUrl, apiKey, user, buttonPosition, children, }: JarveBugReporterProps): react_jsx_runtime.JSX.Element;
|
|
22
26
|
|
|
23
27
|
export { type BugReporterApiConfig, type BugReporterUser, JarveBugReporter };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
type FloatingButtonPosition = 'left' | 'right';
|
|
4
|
+
|
|
3
5
|
interface BugReporterUser {
|
|
4
6
|
name: string;
|
|
5
7
|
email: string;
|
|
@@ -14,10 +16,12 @@ interface JarveBugReporterProps {
|
|
|
14
16
|
apiUrl: string;
|
|
15
17
|
/** API key for your site (starts with "brk_") */
|
|
16
18
|
apiKey: string;
|
|
19
|
+
/** Optional position for the floating button (default: 'right') */
|
|
20
|
+
buttonPosition?: FloatingButtonPosition;
|
|
17
21
|
/** Optional user info. If not provided, the AI will ask for name/email during the conversation. */
|
|
18
22
|
user?: BugReporterUser;
|
|
19
23
|
children: React.ReactNode;
|
|
20
24
|
}
|
|
21
|
-
declare function JarveBugReporter({ apiUrl, apiKey, user, children, }: JarveBugReporterProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function JarveBugReporter({ apiUrl, apiKey, user, buttonPosition, children, }: JarveBugReporterProps): react_jsx_runtime.JSX.Element;
|
|
22
26
|
|
|
23
27
|
export { type BugReporterApiConfig, type BugReporterUser, JarveBugReporter };
|