pinpoint-feedback 0.0.0-stage → 0.1.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pinpoint Feedback contributors
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 CHANGED
@@ -1,3 +1,119 @@
1
- # Temporary Holding Version
1
+ # Pinpoint Feedback
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Visual website feedback that lands in Notion. Visitors click a button, get a screenshot of the page, mark it up with pins, arrows, boxes, freehand and text, and send it. Each report becomes a page in **your Notion database** with the original and annotated screenshots attached. Notion is the only backend.
4
+
5
+ ```
6
+ Browser Your server route Notion
7
+ widget → screenshot → annotate ─POST─▶ validate · rate-limit · dedupe ─API─▶ database page
8
+ ◀─JSON─ upload files · create page ◀──── + 2 images
9
+ ```
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install pinpoint-feedback
15
+ ```
16
+
17
+ Peer dependencies: `react`/`react-dom` 18.2+ for the widget, `next` 14.2+ for the Next.js entry points.
18
+
19
+ ## Quick start (Next.js App Router)
20
+
21
+ 1. Create a Notion integration, share a database with it and set the env vars ([full walkthrough](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/getting-started.md)):
22
+
23
+ ```env
24
+ NOTION_API_KEY=ntn_...
25
+ NOTION_FEEDBACK_DATABASE_ID=0123456789abcdef0123456789abcdef
26
+ ```
27
+
28
+ 2. Render the widget in `app/layout.tsx` (works from a Server Component):
29
+
30
+ ```tsx
31
+ import { FeedbackProvider } from "pinpoint-feedback/nextjs";
32
+
33
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
34
+ return (
35
+ <html lang="en">
36
+ <body>
37
+ {children}
38
+ <FeedbackProvider position="bottom-right" theme="light" />
39
+ </body>
40
+ </html>
41
+ );
42
+ }
43
+ ```
44
+
45
+ 3. Add the endpoint in `app/api/feedback/route.ts`:
46
+
47
+ ```ts
48
+ import { createFeedbackHandler } from "pinpoint-feedback/nextjs/server";
49
+
50
+ export const runtime = "nodejs";
51
+ export const POST = createFeedbackHandler();
52
+ ```
53
+
54
+ Missing database columns are created on the first submission. A working app lives in [`examples/nextjs-app`](https://github.com/dwrth/pinpoint-feedback/blob/main/examples/nextjs-app).
55
+
56
+ Custom categories and languages are shared between the layout and the route through one config file ([categories](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/categories.md), [i18n](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/i18n.md)):
57
+
58
+ ```ts
59
+ // feedback.config.ts — import from the root entry so server code can use it
60
+ import { defineCategories } from "pinpoint-feedback";
61
+ import { de } from "pinpoint-feedback/locales/de";
62
+
63
+ export const categories = defineCategories(["bug", { id: "perf", label: "Performance", color: "orange" }]);
64
+ export const locale = de;
65
+ ```
66
+
67
+ ```tsx
68
+ <FeedbackProvider categories={categories} defaultCategory="perf" locale={locale} /> // layout
69
+ export const POST = createFeedbackHandler({ categories, locale }); // route
70
+ ```
71
+
72
+ Built-in languages: English, German, French, Spanish, Italian, Portuguese (Brazil), Dutch, Polish, Japanese, Chinese (Simplified), Arabic (RTL).
73
+
74
+ ## Docs
75
+
76
+ | Topic | |
77
+ | --- | --- |
78
+ | [Getting started](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/getting-started.md) | Notion integration, database, env vars, troubleshooting |
79
+ | [Widget](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/widget.md) | `FeedbackProvider` / `FeedbackWidget` props, `useFeedback`, theming |
80
+ | [Server handler](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/server.md) | Handler options, status codes, CORS, rate limiting, security |
81
+ | [Notion](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/notion.md) | Database properties, schema auto-setup, page layout, file uploads |
82
+ | [Categories](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/categories.md) | `defineCategories`, type-safe ids, Notion select options |
83
+ | [Internationalization](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/i18n.md) | Built-in locales, negotiation, overrides, RTL, report language |
84
+ | [Screenshots](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/screenshots.md) | How capture works, what can't be captured, screen-capture fallback |
85
+ | [Annotation editor](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/annotation.md) | Tools, shortcuts, zoom/pan, data model, standalone usage |
86
+ | [Reliability](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/reliability.md) | Submission IDs, duplicate protection, offline outbox, retries |
87
+ | [Other frameworks](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/frameworks.md) | Web `Request`/`Response` handler, React without Next, vanilla JS |
88
+ | [Architecture](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/architecture.md) | Packages, entry points, DI interfaces, data flow |
89
+ | [Development](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/development.md) | Monorepo, tests, e2e, CI, releasing |
90
+
91
+ ## Entry points
92
+
93
+ | Import | Use |
94
+ | --- | --- |
95
+ | `pinpoint-feedback` | Core (framework-free): capture, annotation editor, client, `defineCategories`, `defineLocale` |
96
+ | `pinpoint-feedback/nextjs` | `FeedbackProvider`, `FeedbackWidget`, `useFeedback` (client) |
97
+ | `pinpoint-feedback/nextjs/server` | `createFeedbackHandler` (server-only) |
98
+ | `pinpoint-feedback/react` | Widget for React apps without Next.js |
99
+ | `pinpoint-feedback/server` | `createFeedbackRequestHandler` for any Web `Request`/`Response` runtime |
100
+ | `pinpoint-feedback/locales/<tag>` | Language bundles, e.g. `locales/de`, `locales/pt-BR` |
101
+
102
+ The Notion token is only ever read on the server; `pinpoint-feedback/nextjs/server` imports `server-only` so it can't end up in a client bundle.
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ npm install
108
+ npm run build # all packages
109
+ npm test # vitest (core, server, react, nextjs, scripts)
110
+ npm run test:coverage # with enforced coverage thresholds
111
+ npm run typecheck
112
+ npm run e2e # Next.js example + mock Notion API + Playwright
113
+ ```
114
+
115
+ See [Development](https://github.com/dwrth/pinpoint-feedback/blob/main/docs/development.md) for the example app, the mock Notion server and CI.
116
+
117
+ ## License
118
+
119
+ [MIT](https://github.com/dwrth/pinpoint-feedback/blob/main/LICENSE)
package/dist/core.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core";
package/dist/core.js ADDED
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core";
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/ar";
3
+ export { default } from "@pinpoint-feedback/core/locales/ar";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/ar";
3
+ export { default } from "@pinpoint-feedback/core/locales/ar";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/de";
3
+ export { default } from "@pinpoint-feedback/core/locales/de";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/de";
3
+ export { default } from "@pinpoint-feedback/core/locales/de";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/en";
3
+ export { default } from "@pinpoint-feedback/core/locales/en";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/en";
3
+ export { default } from "@pinpoint-feedback/core/locales/en";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/es";
3
+ export { default } from "@pinpoint-feedback/core/locales/es";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/es";
3
+ export { default } from "@pinpoint-feedback/core/locales/es";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/fr";
3
+ export { default } from "@pinpoint-feedback/core/locales/fr";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/fr";
3
+ export { default } from "@pinpoint-feedback/core/locales/fr";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/it";
3
+ export { default } from "@pinpoint-feedback/core/locales/it";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/it";
3
+ export { default } from "@pinpoint-feedback/core/locales/it";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/ja";
3
+ export { default } from "@pinpoint-feedback/core/locales/ja";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/ja";
3
+ export { default } from "@pinpoint-feedback/core/locales/ja";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/nl";
3
+ export { default } from "@pinpoint-feedback/core/locales/nl";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/nl";
3
+ export { default } from "@pinpoint-feedback/core/locales/nl";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/pl";
3
+ export { default } from "@pinpoint-feedback/core/locales/pl";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/pl";
3
+ export { default } from "@pinpoint-feedback/core/locales/pl";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/pt-BR";
3
+ export { default } from "@pinpoint-feedback/core/locales/pt-BR";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/pt-BR";
3
+ export { default } from "@pinpoint-feedback/core/locales/pt-BR";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/zh-CN";
3
+ export { default } from "@pinpoint-feedback/core/locales/zh-CN";
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/core/locales/zh-CN";
3
+ export { default } from "@pinpoint-feedback/core/locales/zh-CN";
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/nextjs/server";
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/nextjs/server";
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/nextjs";
package/dist/nextjs.js ADDED
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ // Generated by scripts/build.mjs. Do not edit.
3
+ export {
4
+ DEFAULT_FEEDBACK_ENDPOINT,
5
+ FeedbackProvider,
6
+ FeedbackWidget,
7
+ useFeedback,
8
+ } from "@pinpoint-feedback/nextjs";
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/react";
package/dist/react.js ADDED
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ // Generated by scripts/build.mjs. Do not edit.
3
+ export {
4
+ FeedbackProvider,
5
+ FeedbackWidget,
6
+ useFeedback,
7
+ } from "@pinpoint-feedback/react";
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/server";
package/dist/server.js ADDED
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/build.mjs. Do not edit.
2
+ export * from "@pinpoint-feedback/server";
package/package.json CHANGED
@@ -1,6 +1,90 @@
1
1
  {
2
2
  "name": "pinpoint-feedback",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Visual website feedback widget with screenshot annotation. Reports go straight into your Notion database.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/dwrth/pinpoint-feedback.git",
9
+ "directory": "packages/pinpoint-feedback"
10
+ },
11
+ "homepage": "https://github.com/dwrth/pinpoint-feedback#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/dwrth/pinpoint-feedback/issues"
14
+ },
15
+ "keywords": [
16
+ "feedback",
17
+ "bug-report",
18
+ "screenshot",
19
+ "annotation",
20
+ "notion",
21
+ "nextjs",
22
+ "react",
23
+ "widget"
24
+ ],
25
+ "type": "module",
26
+ "sideEffects": false,
27
+ "main": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js"
33
+ },
34
+ "./core": {
35
+ "types": "./dist/core.d.ts",
36
+ "import": "./dist/core.js"
37
+ },
38
+ "./server": {
39
+ "types": "./dist/server.d.ts",
40
+ "import": "./dist/server.js"
41
+ },
42
+ "./react": {
43
+ "types": "./dist/react.d.ts",
44
+ "import": "./dist/react.js"
45
+ },
46
+ "./nextjs": {
47
+ "types": "./dist/nextjs.d.ts",
48
+ "import": "./dist/nextjs.js"
49
+ },
50
+ "./nextjs/server": {
51
+ "types": "./dist/nextjs-server.d.ts",
52
+ "import": "./dist/nextjs-server.js"
53
+ },
54
+ "./locales/*": {
55
+ "types": "./dist/locales/*.d.ts",
56
+ "import": "./dist/locales/*.js"
57
+ },
58
+ "./package.json": "./package.json"
59
+ },
60
+ "files": [
61
+ "dist",
62
+ "README.md",
63
+ "LICENSE"
64
+ ],
65
+ "scripts": {
66
+ "build": "node scripts/build.mjs"
67
+ },
68
+ "dependencies": {
69
+ "@pinpoint-feedback/core": "0.1.1",
70
+ "@pinpoint-feedback/nextjs": "0.1.1",
71
+ "@pinpoint-feedback/react": "0.1.1",
72
+ "@pinpoint-feedback/server": "0.1.1"
73
+ },
74
+ "peerDependencies": {
75
+ "next": ">=14.2.0",
76
+ "react": ">=18.2.0",
77
+ "react-dom": ">=18.2.0"
78
+ },
79
+ "peerDependenciesMeta": {
80
+ "next": {
81
+ "optional": true
82
+ },
83
+ "react": {
84
+ "optional": true
85
+ },
86
+ "react-dom": {
87
+ "optional": true
88
+ }
89
+ }
90
+ }