@pinpoint-feedback/nextjs 0.0.0-stage → 0.1.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 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,11 @@
1
- # Temporary Holding Version
1
+ # @pinpoint-feedback/nextjs
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
+ Next.js App Router integration: FeedbackProvider and createFeedbackHandler.
4
+
5
+ Part of [Pinpoint Feedback](https://github.com/dwrth/pinpoint-feedback): visual website feedback that lands in Notion. Most apps install the umbrella package instead:
6
+
7
+ ```bash
8
+ npm install pinpoint-feedback
9
+ ```
10
+
11
+ Docs: https://github.com/dwrth/pinpoint-feedback#docs
@@ -0,0 +1,23 @@
1
+ import type { CategoryList } from "@pinpoint-feedback/core";
2
+ import { type ReactElement } from "react";
3
+ import { type DefaultCategoryList, type FeedbackProviderProps, type FeedbackWidgetProps } from "@pinpoint-feedback/react";
4
+ export { useFeedback } from "@pinpoint-feedback/react";
5
+ export type { CategoryColor, CategoryDefinition, CategoryId, CategoryInput, CategoryList, DefaultCategoryList, FeedbackController, FeedbackProviderProps, FeedbackWidgetError, FeedbackWidgetPosition, FeedbackWidgetProps, FeedbackWidgetTheme, LocaleBundle, LocaleOverrides, TextDirection, } from "@pinpoint-feedback/react";
6
+ export declare const DEFAULT_FEEDBACK_ENDPOINT = "/api/feedback";
7
+ /**
8
+ * Feedback widget for the Next.js App Router. Can be rendered directly from a Server
9
+ * Component layout; `children` are optional.
10
+ *
11
+ * Pass `categories` as a plain array (e.g. from a shared `feedback.config.ts` built with
12
+ * `defineCategories` from `"pinpoint-feedback"`) so the same list reaches the route handler.
13
+ *
14
+ * Locale bundles are plain data, so they can be imported in the Server Component and passed down:
15
+ *
16
+ * ```tsx
17
+ * import de from "pinpoint-feedback/locales/de";
18
+ *
19
+ * <FeedbackProvider position="bottom-right" theme="light" categories={categories} defaultCategory="bug" locale={de} />
20
+ * ```
21
+ */
22
+ export declare function FeedbackProvider<const C extends CategoryList = DefaultCategoryList>(props: FeedbackProviderProps<C>): ReactElement;
23
+ export declare function FeedbackWidget<const C extends CategoryList = DefaultCategoryList>(props: FeedbackWidgetProps<C>): ReactElement;
package/dist/index.js ADDED
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { createElement } from "react";
3
+ import { FeedbackProvider as FeedbackProvider$1, FeedbackWidget as FeedbackWidget$1, useFeedback } from "@pinpoint-feedback/react";
4
+ // src/index.ts
5
+ var DEFAULT_FEEDBACK_ENDPOINT = "/api/feedback";
6
+ /**
7
+ * `process.env.NEXT_PUBLIC_*` must be accessed literally so that Next.js can inline the
8
+ * values into the client bundle at build time.
9
+ */
10
+ function readPublicEnv() {
11
+ try {
12
+ return {
13
+ endpoint: process.env.NEXT_PUBLIC_PINPOINT_ENDPOINT || void 0,
14
+ projectId: process.env.NEXT_PUBLIC_PINPOINT_PROJECT_ID || void 0
15
+ };
16
+ } catch {
17
+ return {};
18
+ }
19
+ }
20
+ function withDefaults(props) {
21
+ const env = readPublicEnv();
22
+ return {
23
+ ...props,
24
+ endpoint: props.endpoint ?? env.endpoint ?? "/api/feedback",
25
+ projectId: props.projectId ?? env.projectId
26
+ };
27
+ }
28
+ /**
29
+ * Feedback widget for the Next.js App Router. Can be rendered directly from a Server
30
+ * Component layout; `children` are optional.
31
+ *
32
+ * Pass `categories` as a plain array (e.g. from a shared `feedback.config.ts` built with
33
+ * `defineCategories` from `"pinpoint-feedback"`) so the same list reaches the route handler.
34
+ *
35
+ * Locale bundles are plain data, so they can be imported in the Server Component and passed down:
36
+ *
37
+ * ```tsx
38
+ * import de from "pinpoint-feedback/locales/de";
39
+ *
40
+ * <FeedbackProvider position="bottom-right" theme="light" categories={categories} defaultCategory="bug" locale={de} />
41
+ * ```
42
+ */
43
+ function FeedbackProvider(props) {
44
+ return createElement(FeedbackProvider$1, withDefaults(props));
45
+ }
46
+ function FeedbackWidget(props) {
47
+ return createElement(FeedbackWidget$1, withDefaults(props));
48
+ }
49
+ export { DEFAULT_FEEDBACK_ENDPOINT, FeedbackProvider, FeedbackWidget, useFeedback };
50
+
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["BaseFeedbackProvider","BaseFeedbackWidget"],"sources":["../src/index.ts"],"sourcesContent":["// Client boundary: vite.config.ts prepends the \"use client\" directive to the built entry.\nimport type { CategoryList } from \"@pinpoint-feedback/core\";\nimport { createElement, type ReactElement } from \"react\";\nimport {\n FeedbackProvider as BaseFeedbackProvider,\n FeedbackWidget as BaseFeedbackWidget,\n type DefaultCategoryList,\n type FeedbackProviderProps,\n type FeedbackWidgetProps,\n} from \"@pinpoint-feedback/react\";\n\nexport { useFeedback } from \"@pinpoint-feedback/react\";\nexport type {\n CategoryColor,\n CategoryDefinition,\n CategoryId,\n CategoryInput,\n CategoryList,\n DefaultCategoryList,\n FeedbackController,\n FeedbackProviderProps,\n FeedbackWidgetError,\n FeedbackWidgetPosition,\n FeedbackWidgetProps,\n FeedbackWidgetTheme,\n LocaleBundle,\n LocaleOverrides,\n TextDirection,\n} from \"@pinpoint-feedback/react\";\n\nexport const DEFAULT_FEEDBACK_ENDPOINT = \"/api/feedback\";\n\n/**\n * `process.env.NEXT_PUBLIC_*` must be accessed literally so that Next.js can inline the\n * values into the client bundle at build time.\n */\nfunction readPublicEnv(): { endpoint?: string; projectId?: string } {\n try {\n return {\n endpoint: process.env.NEXT_PUBLIC_PINPOINT_ENDPOINT || undefined,\n projectId: process.env.NEXT_PUBLIC_PINPOINT_PROJECT_ID || undefined,\n };\n } catch {\n return {};\n }\n}\n\nfunction withDefaults<P extends FeedbackWidgetProps<CategoryList>>(props: P): P {\n const env = readPublicEnv();\n return {\n ...props,\n endpoint: props.endpoint ?? env.endpoint ?? DEFAULT_FEEDBACK_ENDPOINT,\n projectId: props.projectId ?? env.projectId,\n };\n}\n\n/**\n * Feedback widget for the Next.js App Router. Can be rendered directly from a Server\n * Component layout; `children` are optional.\n *\n * Pass `categories` as a plain array (e.g. from a shared `feedback.config.ts` built with\n * `defineCategories` from `\"pinpoint-feedback\"`) so the same list reaches the route handler.\n *\n * Locale bundles are plain data, so they can be imported in the Server Component and passed down:\n *\n * ```tsx\n * import de from \"pinpoint-feedback/locales/de\";\n *\n * <FeedbackProvider position=\"bottom-right\" theme=\"light\" categories={categories} defaultCategory=\"bug\" locale={de} />\n * ```\n */\nexport function FeedbackProvider<const C extends CategoryList = DefaultCategoryList>(\n props: FeedbackProviderProps<C>,\n): ReactElement {\n return createElement(BaseFeedbackProvider<C>, withDefaults(props));\n}\n\nexport function FeedbackWidget<const C extends CategoryList = DefaultCategoryList>(\n props: FeedbackWidgetProps<C>,\n): ReactElement {\n return createElement(BaseFeedbackWidget<C>, withDefaults(props));\n}\n"],"mappings":";;;;AA8BA,IAAa,4BAA4B;;;;;AAMzC,SAAS,gBAA2D;CAClE,IAAI;EACF,OAAO;GACL,UAAU,QAAQ,IAAI,iCAAiC,KAAA;GACvD,WAAW,QAAQ,IAAI,mCAAmC,KAAA;EAC5D;CACF,QAAQ;EACN,OAAO,CAAC;CACV;AACF;AAEA,SAAS,aAA0D,OAAa;CAC9E,MAAM,MAAM,cAAc;CAC1B,OAAO;EACL,GAAG;EACH,UAAU,MAAM,YAAY,IAAI,YAAA;EAChC,WAAW,MAAM,aAAa,IAAI;CACpC;AACF;;;;;;;;;;;;;;;;AAiBA,SAAgB,iBACd,OACc;CACd,OAAO,cAAcA,oBAAyB,aAAa,KAAK,CAAC;AACnE;AAEA,SAAgB,eACd,OACc;CACd,OAAO,cAAcC,kBAAuB,aAAa,KAAK,CAAC;AACjE"}
@@ -0,0 +1,33 @@
1
+ import "server-only";
2
+ import { type FeedbackHandlerOptions } from "@pinpoint-feedback/server";
3
+ export type { FeedbackHandlerOptions } from "@pinpoint-feedback/server";
4
+ export type FeedbackRouteHandler = (request: Request) => Promise<Response>;
5
+ export interface NextFeedbackHandlerOptions extends Partial<FeedbackHandlerOptions> {
6
+ /** Environment to read Notion settings from. Defaults to `process.env`, read on the first request. */
7
+ env?: Record<string, string | undefined>;
8
+ }
9
+ /**
10
+ * Creates a Next.js route handler for feedback submissions.
11
+ *
12
+ * Notion credentials are read from `NOTION_API_KEY` / `NOTION_FEEDBACK_DATABASE_ID`
13
+ * (plus optional `NOTION_API_BASE_URL` and `PINPOINT_PROJECT_ID`) when the first request
14
+ * arrives, so `next build` works without them. Explicit options take precedence.
15
+ *
16
+ * ```ts
17
+ * // app/api/feedback/route.ts
18
+ * export const POST = createFeedbackHandler();
19
+ * ```
20
+ */
21
+ export declare function createFeedbackHandler(options?: NextFeedbackHandlerOptions): FeedbackRouteHandler;
22
+ /**
23
+ * Same as {@link createFeedbackHandler}, returned as `{ POST, OPTIONS }` sharing one handler,
24
+ * for endpoints that receive cross-origin submissions (see `allowedOrigins`).
25
+ *
26
+ * ```ts
27
+ * export const { POST, OPTIONS } = createFeedbackRouteHandlers({ allowedOrigins: ["https://example.com"] });
28
+ * ```
29
+ */
30
+ export declare function createFeedbackRouteHandlers(options?: NextFeedbackHandlerOptions): {
31
+ POST: FeedbackRouteHandler;
32
+ OPTIONS: FeedbackRouteHandler;
33
+ };
package/dist/server.js ADDED
@@ -0,0 +1,98 @@
1
+ import "server-only";
2
+ import { createFeedbackRequestHandler, resolveNotionConfigFromEnv } from "@pinpoint-feedback/server";
3
+ // src/server.ts
4
+ function readProcessEnv() {
5
+ return typeof process !== "undefined" && process.env ? process.env : {};
6
+ }
7
+ function resolveOptions({ env, ...options }) {
8
+ if (options.backend) return {
9
+ ok: true,
10
+ options
11
+ };
12
+ const source = env ?? readProcessEnv();
13
+ const hasExplicitNotion = Boolean(options.notion?.apiKey && options.notion?.databaseId);
14
+ let fromEnv;
15
+ try {
16
+ fromEnv = resolveNotionConfigFromEnv(source);
17
+ } catch (error) {
18
+ if (!hasExplicitNotion) return {
19
+ ok: false,
20
+ message: error instanceof Error ? error.message : String(error)
21
+ };
22
+ }
23
+ const { projectId: envProjectId, ...envNotion } = fromEnv ?? {};
24
+ const notion = {
25
+ ...envNotion,
26
+ ...options.notion
27
+ };
28
+ return {
29
+ ok: true,
30
+ options: {
31
+ ...options,
32
+ notion,
33
+ projectId: options.projectId ?? envProjectId
34
+ }
35
+ };
36
+ }
37
+ function misconfigured() {
38
+ return Response.json({
39
+ ok: false,
40
+ error: {
41
+ code: "misconfigured",
42
+ message: "The feedback service is not configured. Please contact the site owner.",
43
+ retryable: false
44
+ }
45
+ }, {
46
+ status: 500,
47
+ headers: { "cache-control": "no-store" }
48
+ });
49
+ }
50
+ /**
51
+ * Creates a Next.js route handler for feedback submissions.
52
+ *
53
+ * Notion credentials are read from `NOTION_API_KEY` / `NOTION_FEEDBACK_DATABASE_ID`
54
+ * (plus optional `NOTION_API_BASE_URL` and `PINPOINT_PROJECT_ID`) when the first request
55
+ * arrives, so `next build` works without them. Explicit options take precedence.
56
+ *
57
+ * ```ts
58
+ * // app/api/feedback/route.ts
59
+ * export const POST = createFeedbackHandler();
60
+ * ```
61
+ */
62
+ function createFeedbackHandler(options = {}) {
63
+ let handler;
64
+ return async function feedbackRouteHandler(request) {
65
+ if (!handler) {
66
+ const resolved = resolveOptions(options);
67
+ if (!resolved.ok) {
68
+ (options.logger ?? console).error(`[pinpoint-feedback] ${resolved.message}`);
69
+ return misconfigured();
70
+ }
71
+ try {
72
+ handler = createFeedbackRequestHandler(resolved.options);
73
+ } catch (error) {
74
+ (options.logger ?? console).error("[pinpoint-feedback] Failed to create feedback handler", error);
75
+ return misconfigured();
76
+ }
77
+ }
78
+ return handler(request);
79
+ };
80
+ }
81
+ /**
82
+ * Same as {@link createFeedbackHandler}, returned as `{ POST, OPTIONS }` sharing one handler,
83
+ * for endpoints that receive cross-origin submissions (see `allowedOrigins`).
84
+ *
85
+ * ```ts
86
+ * export const { POST, OPTIONS } = createFeedbackRouteHandlers({ allowedOrigins: ["https://example.com"] });
87
+ * ```
88
+ */
89
+ function createFeedbackRouteHandlers(options = {}) {
90
+ const handler = createFeedbackHandler(options);
91
+ return {
92
+ POST: handler,
93
+ OPTIONS: handler
94
+ };
95
+ }
96
+ export { createFeedbackHandler, createFeedbackRouteHandlers };
97
+
98
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","names":[],"sources":["../src/server.ts"],"sourcesContent":["import \"server-only\";\n\nimport {\n createFeedbackRequestHandler,\n resolveNotionConfigFromEnv,\n type FeedbackHandlerOptions,\n} from \"@pinpoint-feedback/server\";\nimport type { SubmissionFailure } from \"@pinpoint-feedback/core\";\n\nexport type { FeedbackHandlerOptions } from \"@pinpoint-feedback/server\";\n\nexport type FeedbackRouteHandler = (request: Request) => Promise<Response>;\n\nexport interface NextFeedbackHandlerOptions extends Partial<FeedbackHandlerOptions> {\n /** Environment to read Notion settings from. Defaults to `process.env`, read on the first request. */\n env?: Record<string, string | undefined>;\n}\n\ntype Resolved = { ok: true; options: FeedbackHandlerOptions } | { ok: false; message: string };\n\nfunction readProcessEnv(): Record<string, string | undefined> {\n return typeof process !== \"undefined\" && process.env ? process.env : {};\n}\n\nfunction resolveOptions({ env, ...options }: NextFeedbackHandlerOptions): Resolved {\n if (options.backend) return { ok: true, options: options as FeedbackHandlerOptions };\n\n const source = env ?? readProcessEnv();\n const hasExplicitNotion = Boolean(options.notion?.apiKey && options.notion?.databaseId);\n let fromEnv: ReturnType<typeof resolveNotionConfigFromEnv> | undefined;\n try {\n fromEnv = resolveNotionConfigFromEnv(source);\n } catch (error) {\n if (!hasExplicitNotion) return { ok: false, message: error instanceof Error ? error.message : String(error) };\n }\n\n const { projectId: envProjectId, ...envNotion } = fromEnv ?? {};\n const notion = { ...envNotion, ...options.notion } as NonNullable<FeedbackHandlerOptions[\"notion\"]>;\n return {\n ok: true,\n options: { ...options, notion, projectId: options.projectId ?? envProjectId } as FeedbackHandlerOptions,\n };\n}\n\nfunction misconfigured(): Response {\n const body: SubmissionFailure = {\n ok: false,\n error: {\n code: \"misconfigured\",\n message: \"The feedback service is not configured. Please contact the site owner.\",\n retryable: false,\n },\n };\n return Response.json(body, { status: 500, headers: { \"cache-control\": \"no-store\" } });\n}\n\n/**\n * Creates a Next.js route handler for feedback submissions.\n *\n * Notion credentials are read from `NOTION_API_KEY` / `NOTION_FEEDBACK_DATABASE_ID`\n * (plus optional `NOTION_API_BASE_URL` and `PINPOINT_PROJECT_ID`) when the first request\n * arrives, so `next build` works without them. Explicit options take precedence.\n *\n * ```ts\n * // app/api/feedback/route.ts\n * export const POST = createFeedbackHandler();\n * ```\n */\nexport function createFeedbackHandler(options: NextFeedbackHandlerOptions = {}): FeedbackRouteHandler {\n let handler: FeedbackRouteHandler | undefined;\n\n return async function feedbackRouteHandler(request: Request): Promise<Response> {\n if (!handler) {\n const resolved = resolveOptions(options);\n if (!resolved.ok) {\n (options.logger ?? console).error(`[pinpoint-feedback] ${resolved.message}`);\n return misconfigured();\n }\n try {\n handler = createFeedbackRequestHandler(resolved.options);\n } catch (error) {\n (options.logger ?? console).error(\"[pinpoint-feedback] Failed to create feedback handler\", error);\n return misconfigured();\n }\n }\n return handler(request);\n };\n}\n\n/**\n * Same as {@link createFeedbackHandler}, returned as `{ POST, OPTIONS }` sharing one handler,\n * for endpoints that receive cross-origin submissions (see `allowedOrigins`).\n *\n * ```ts\n * export const { POST, OPTIONS } = createFeedbackRouteHandlers({ allowedOrigins: [\"https://example.com\"] });\n * ```\n */\nexport function createFeedbackRouteHandlers(options: NextFeedbackHandlerOptions = {}): {\n POST: FeedbackRouteHandler;\n OPTIONS: FeedbackRouteHandler;\n} {\n const handler = createFeedbackHandler(options);\n return { POST: handler, OPTIONS: handler };\n}\n"],"mappings":";;;AAoBA,SAAS,iBAAqD;CAC5D,OAAO,OAAO,YAAY,eAAe,QAAQ,MAAM,QAAQ,MAAM,CAAC;AACxE;AAEA,SAAS,eAAe,EAAE,KAAK,GAAG,WAAiD;CACjF,IAAI,QAAQ,SAAS,OAAO;EAAE,IAAI;EAAe;CAAkC;CAEnF,MAAM,SAAS,OAAO,eAAe;CACrC,MAAM,oBAAoB,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,QAAQ,UAAU;CACtF,IAAI;CACJ,IAAI;EACF,UAAU,2BAA2B,MAAM;CAC7C,SAAS,OAAO;EACd,IAAI,CAAC,mBAAmB,OAAO;GAAE,IAAI;GAAO,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EAAE;CAC9G;CAEA,MAAM,EAAE,WAAW,cAAc,GAAG,cAAc,WAAW,CAAC;CAC9D,MAAM,SAAS;EAAE,GAAG;EAAW,GAAG,QAAQ;CAAO;CACjD,OAAO;EACL,IAAI;EACJ,SAAS;GAAE,GAAG;GAAS;GAAQ,WAAW,QAAQ,aAAa;EAAa;CAC9E;AACF;AAEA,SAAS,gBAA0B;CASjC,OAAO,SAAS,KAAK;EAPnB,IAAI;EACJ,OAAO;GACL,MAAM;GACN,SAAS;GACT,WAAW;EACb;CAEmB,GAAM;EAAE,QAAQ;EAAK,SAAS,EAAE,iBAAiB,WAAW;CAAE,CAAC;AACtF;;;;;;;;;;;;;AAcA,SAAgB,sBAAsB,UAAsC,CAAC,GAAyB;CACpG,IAAI;CAEJ,OAAO,eAAe,qBAAqB,SAAqC;EAC9E,IAAI,CAAC,SAAS;GACZ,MAAM,WAAW,eAAe,OAAO;GACvC,IAAI,CAAC,SAAS,IAAI;IAChB,CAAC,QAAQ,UAAU,QAAA,CAAS,MAAM,uBAAuB,SAAS,SAAS;IAC3E,OAAO,cAAc;GACvB;GACA,IAAI;IACF,UAAU,6BAA6B,SAAS,OAAO;GACzD,SAAS,OAAO;IACd,CAAC,QAAQ,UAAU,QAAA,CAAS,MAAM,yDAAyD,KAAK;IAChG,OAAO,cAAc;GACvB;EACF;EACA,OAAO,QAAQ,OAAO;CACxB;AACF;;;;;;;;;AAUA,SAAgB,4BAA4B,UAAsC,CAAC,GAGjF;CACA,MAAM,UAAU,sBAAsB,OAAO;CAC7C,OAAO;EAAE,MAAM;EAAS,SAAS;CAAQ;AAC3C"}
package/package.json CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
2
  "name": "@pinpoint-feedback/nextjs",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Next.js App Router integration for Pinpoint Feedback.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/dwrth/pinpoint-feedback.git",
9
+ "directory": "packages/nextjs"
10
+ },
11
+ "homepage": "https://github.com/dwrth/pinpoint-feedback#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/dwrth/pinpoint-feedback/issues"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": false,
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ },
24
+ "./server": {
25
+ "types": "./dist/server.d.ts",
26
+ "import": "./dist/server.js"
27
+ },
28
+ "./package.json": "./package.json"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "README.md",
33
+ "LICENSE"
34
+ ],
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "scripts": {
39
+ "build": "vite build && tsc -p tsconfig.build.json"
40
+ },
41
+ "dependencies": {
42
+ "@pinpoint-feedback/core": "0.1.0",
43
+ "@pinpoint-feedback/react": "0.1.0",
44
+ "@pinpoint-feedback/server": "0.1.0",
45
+ "server-only": "^0.0.1"
46
+ },
47
+ "peerDependencies": {
48
+ "next": ">=14.2.0",
49
+ "react": ">=18.2.0",
50
+ "react-dom": ">=18.2.0"
51
+ }
52
+ }